Class LoadingProgressUI
A UI progress bar component that displays the current scene asset loading progress. It updates its value when it receives a corresponding message.
[RequireComponent(typeof(Slider))]
public class LoadingProgressUI : MonoBehaviour, IHandle<LoadingProgressMessage>
Inheritance
Implements
IHandle<LoadingProgressMessage>
Remarks
This component listening to event aggregator. When a LoadingProgressMessage is published, the LoadingProgressMessage) method is invoked, and the progress bar will update.
Methods
Handle(LoadingProgressMessage)
Processes the received message and applies its payload to this subscriber's state.
Update the current value of the progress bar value.
public void Handle(LoadingProgressMessage message)
Parameters
| Name | Type | Description |
|---|---|---|
message | LoadingProgressMessage | The message containing the current progress value (0 to 1). |
Remarks
Called by the event aggregator when a LoadingProgressMessage is received.