Skip to main content

GaugeProgressBar

A class in Root.Township, the global namespace.

A progress bar drawn with a gauge shader, with an extra alpha limit that hides the renderers at zero. Client side.

Constructors​

MemberWhat it is
GaugeProgressBar()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

3 private and internal fields
MemberWhat it is
private static readonly int _AlphaLimitShader property id for _AlphaLimit.
private static readonly int _FillProgressShader property id for _FillProgress.
private float alphaBacking field for Alpha.

Properties​

MemberWhat it is
float Alpha { get; set; }Alpha limit for the gauge. Zero hides the renderers.
override int ProgressVariable { get; }Uses the _FillProgress shader property for progress.

Methods​

MemberWhat it is
protected override void OnValidate()Editor: refreshes the bar and alpha on prefab instances.
1 private and internal method
MemberWhat it is
private void UpdateAlpha()Sets _AlphaLimit on the renderers, or turns them off when alpha is zero.

Used in​

Members of other types that take, return or hold a GaugeProgressBar: