Class GlobalSlider
The component synchronizes the value of the Slider UI component.
Inherited Members
Namespace: black.kit.toybox
Assembly: cs.temp.dll.dll
Syntax
public sealed class GlobalSlider : SyncBehaviour
Remarks
Usage (in the inspector of Unity Editor):
-
Add this component on the same object as the Slider component.
If the component is not found on the same object, you should
specify the Slider component in the
Slider
field. -
Set the following to
OnValueChanged (Single)
of the tied Slider component.
Emission | Runtime Only |
Reference | Specify this component in hierarchy |
Function |
UdonBehaviour.SendCustomEvent (string)
|
Argument | OnValueChanged |
Fields
NAME_SLIDER
The property name of the Slider component.
Declaration
public const string NAME_SLIDER = ""
Field Value
Type | Description |
---|---|
System.String |
value
The value to synchronize.
Declaration
public float value
Field Value
Type | Description |
---|---|
System.Single |
Methods
Initialize()
Initialize the object.
Declaration
protected override void Initialize()
Overrides
OnValueChanged()
The callback when the value is changed.
Declaration
public void OnValueChanged()
SetValue(Single)
Set the value to the slider.
Declaration
public void SetValue(float value)
Parameters
Type | Name | Description |
---|---|---|
System.Single | value | The value to set. |
UpdateView()
The callback to update the view, e.g. on synchronized the value.
Declaration
protected override void UpdateView()