Class GlobalToggles
The component synchronizes the selection state of the Toggles UI component.
Inherited Members
Namespace: black.kit.toybox
Assembly: cs.temp.dll.dll
Syntax
public sealed class GlobalToggles : SyncBehaviour
Remarks
Usage (in the inspector of Unity Editor):
-
Add this component on the same object as the ToggleGroup component.
If the component is not found on the same object, you should
specify the ToggleGroup component in the
ToggleGroup
field. -
Set the following to
OnValueChanged (Boolean)
in each Toggle component associated with the ToggleGroup component.
Emission | Runtime Only |
Reference | Specify this component in hierarchy |
Function |
UdonBehaviour.SendCustomEvent (string)
|
Argument | OnValueChanged |
Fields
index
The value to synchronize.
Declaration
public sbyte index
Field Value
Type | Description |
---|---|
System.SByte |
Remarks
The value is the index of the selected toggle. When the value is -1, no toggle is selected.
NAME_TOGGLE_GROUP
The property name of the toggle group component.
Declaration
public const string NAME_TOGGLE_GROUP = ""
Field Value
Type | Description |
---|---|
System.String |
NAME_TOGGLES
The property name of the toggle component.
Declaration
public const string NAME_TOGGLES = "toggles"
Field Value
Type | Description |
---|---|
System.String |
Methods
Initialize()
Initialize the object.
Declaration
protected override void Initialize()
Overrides
OnValueChanged()
The callback when the value is changed.
Declaration
public void OnValueChanged()
SetValue(SByte)
Declaration
public void SetValue(sbyte index)
Parameters
Type | Name | Description |
---|---|---|
System.SByte | index |
UpdateView()
The callback to update the view, e.g. on synchronized the value.
Declaration
protected override void UpdateView()