Skip to content

Get Sansar

Script API

UIProgressBar

Where: Client
More page actions

For the complete documentation index, see llms.txt. This page is also available as Markdown.

Class Namespace Sansar.Simulation Inherits Sansar.Script.InstanceInterface Added in 33.0.0

Manages a progress bar UI element.

public class UIProgressBar : Sansar.Script.InstanceInterface

Remarks

Used for progress bars on interactions.

Members at a glance

KindMembers
PropertiesId · Label
MethodsCancel · 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.

ParameterTypeDescription
labelstringText of the bar.
durationSecondsfloatDuration.
colorSansar.ColorColor.
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.

ParameterTypeDescription
labelstringText of the bar.
durationSecondsfloatDuration.
colorSansar.ColorColor.
handlerAction<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.