ProgressBar
A control that displays the progress between a lower and upper bound value. For more information, refer to UXML element ProgressBar.
Read time 6 minutesLast updated 2 days ago
Definition
- Type: Class
- Namespace: UnityEngine.UIElements
- Assembly: UnityEngine.UIElementsModule
- Inherits from: AbstractProgressBar
- Implements: IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IBindable, INotifyValueChanged<float>
public class ProgressBar : AbstractProgressBar, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IBindable, INotifyValueChanged<float>
Examples
public ProgressBar CreateProgressBar(){ var progressBar = new ProgressBar { title = "Progress", lowValue = 0f, highValue = 100f, value = 0f }; progressBar.schedule.Execute(() => { progressBar.value += 2f; }).Every(75).Until(() => progressBar.value >= 100f); return progressBar;}