Class SimpleProgressBar
A Progress Bar that will animate the Fill of any specified Image.
Inheritance
Namespace: LlamaSoftware.UI.Utility
Assembly: LlamaSoftware.UI.dll
Syntax
[Obsolete("Use Progress Bar Component instead! SimpleProgressBar will be removed in a future release of Essential UI Pack!")]
public class SimpleProgressBar : MonoBehaviour
Fields
AnimationTime
How long the animation should play in seconds
Declaration
public float AnimationTime
Field Value
| Type | Description |
|---|---|
| System.Single |
EndTime
Declaration
protected float EndTime
Field Value
| Type | Description |
|---|---|
| System.Single |
FillMethod
Declaration
public Image.FillMethod FillMethod
Field Value
| Type | Description |
|---|---|
| UnityEngine.UI.Image.FillMethod |
i
Declaration
protected int i
Field Value
| Type | Description |
|---|---|
| System.Int32 |
OnCompleted
Action to call when progress bar completes animating
Declaration
public UnityEvent OnCompleted
Field Value
| Type | Description |
|---|---|
| UnityEngine.Events.UnityEvent |
OutOfRangeProgressMessage
Declaration
protected string OutOfRangeProgressMessage
Field Value
| Type | Description |
|---|---|
| System.String |
ProgressBarImage
The Filled Image that represents the progress
Declaration
public Image ProgressBarImage
Field Value
| Type | Description |
|---|---|
| UnityEngine.UI.Image |
startingProgress
Declaration
protected float startingProgress
Field Value
| Type | Description |
|---|---|
| System.Single |
targetProgress
Declaration
protected float targetProgress
Field Value
| Type | Description |
|---|---|
| System.Single |
Properties
Progress
Read-only convenience property. Will always be the same as ProgressBarImage.fillAmount
Declaration
public float Progress { get; }
Property Value
| Type | Description |
|---|---|
| System.Single |
Methods
AnimateFromZero(Single)
Animate the progress bar starting from empty to the provided Progress
Declaration
public virtual void AnimateFromZero(float Progress)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | Progress | 0-1 value representing the percent to fill the progress bar |
AnimateProgress()
Coroutine to animate the Progress. Should not be called directly
Declaration
protected virtual IEnumerator AnimateProgress()
Returns
| Type | Description |
|---|---|
| System.Collections.IEnumerator | Coroutine |
Awake()
Declaration
protected virtual void Awake()
Reset()
Resets the progress bar to 0 fill immediately
Declaration
public virtual void Reset()
SetProgress(Single)
Animate the progress bar from current fill to the provided Progress
Declaration
public virtual void SetProgress(float Progress)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | Progress | 0-1 value representing the percent to fill the progress bar |
SetProgressImmediate(Single)
Immediately set the progress bar to the provided Progress (no animation)
Declaration
public virtual void SetProgressImmediate(float Progress)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | Progress | 0-1 value representing the percent to fill the progress bar |
StopAnimation()
Stops the animation at the current progress
Declaration
public virtual void StopAnimation()