Manages a progress bar UI element.
public class UIProgressBar : Sansar.Script.InstanceInterfaceRemarks
Used for progress bars on interactions.
Members at a glance
| Kind | Members |
|---|---|
| Properties | Id · Label |
| Methods | Cancel · Start · ToString |
Properties
Id
Added in 36.3.0
public int Id { get; }The bar’s ID.
Remarks
This ID is only unique to this user’s particular session. It is not globally unique.
Label
Added in 36.3.0
public string Label { get; }The bar’s current Label
Methods
Cancel
Added in 33.0.0
public void Cancel()Remove a progress bar.
Start
Added in 33.0.0
public void Start(
string label,
float durationSeconds,
Sansar.Color color
)Start a progress bar.
| Parameter | Type | Description |
|---|---|---|
label | string | Text of the bar. |
durationSeconds | float | Duration. |
color | Sansar.Color | Color. |
Remarks
Call this with ScriptBase.WaitFor in a coroutine to block until the event is generated.
Added in 33.0.0
public void Start(
string label,
float durationSeconds,
Sansar.Color color,
Action<Sansar.Script.OperationCompleteEvent> handler
)Start a progress bar.
| Parameter | Type | Description |
|---|---|---|
label | string | Text of the bar. |
durationSeconds | float | Duration. |
color | Sansar.Color | Color. |
handler | Action<Sansar.Script.OperationCompleteEvent> | Handler to be called when the event completes. |
Remarks
Call this with ScriptBase.WaitFor in a coroutine to block until the event is generated.
ToString
Added in 36.3.0
public override string ToString()A string representation of this object.
Returns: string — A string representation of this object.
Remarks
The format of this string may change between releases.
Used in examples
Generated from the Sansar 47.10.0 client ScriptApi snapshot.