Class TextUpdatingProgressBar
Utility class to update a given TextMeshProUGUI component with the given progress.
Inheritance
System.Object
UnityEngine.Object
UnityEngine.Component
UnityEngine.Behaviour
UnityEngine.MonoBehaviour
TextUpdatingProgressBar
Inherited Members
Namespace: LlamaSoftware.UI.Utility
Assembly: LlamaSoftware.UI.dll
Syntax
[Obsolete("Use Progress Bar Component instead! TextUpdatingProgressBar will be removed in a future release of Essential UI Pack!")]
public class TextUpdatingProgressBar : SimpleProgressBar
Fields
DecimalsToShow
Maximum number of decimals to display
Declaration
public int DecimalsToShow
Field Value
| Type | Description |
|---|---|
| System.Int32 |
Prefix
Prefix to prepend to the provided percent
Declaration
public string Prefix
Field Value
| Type | Description |
|---|---|
| System.String |
ShowAsDecimal
If percent should be displayed as 0.85 or 85
Declaration
public bool ShowAsDecimal
Field Value
| Type | Description |
|---|---|
| System.Boolean |
Suffix
Suffix to append to the provided percent
Declaration
public string Suffix
Field Value
| Type | Description |
|---|---|
| System.String |
Text
Text to update
Declaration
public TextMeshProUGUI Text
Field Value
| Type | Description |
|---|---|
| TMPro.TextMeshProUGUI |
Methods
AnimateProgress()
Coroutine to animate progress and update text. Do not call directly. Called in SimpleProgressBar.
Declaration
protected override IEnumerator AnimateProgress()
Returns
| Type | Description |
|---|---|
| System.Collections.IEnumerator | Coroutine |
Overrides
SetProgress(Single)
Animate the progress bar from current fill to the provided Progress. Also updates the text.
Declaration
public override void SetProgress(float Progress)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | Progress | 0-1 value representing the percent to fill the progress bar |
Overrides
SetProgressImmediate(Single)
Immediately set the progress bar to the provided Progress (no animation). Also updates the text.
Declaration
public override void SetProgressImmediate(float Progress)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | Progress | 0-1 value representing the percent to fill the progress bar |