Class ToggleWithAnimator
This component works with the Toggle component to perform animation when toggling on and off.
Inheritance
System.Object
ToggleWithAnimator
Namespace: black.kit.toybox
Assembly: cs.temp.dll.dll
Syntax
public sealed class ToggleWithAnimator : UdonSharpBehaviour
Remarks
Usage (in the inspector of Unity Editor):
-
Add this component on the same object as the Animator component.
If the component is not found on the same object, you should
specify the Animator component in the
Animator
field. - Deploy this component on the same object as the Toggle component or manually link it.
-
Set the following to
OnValueChanged (Boolean)
of the tied Toggle component.
Emission | Runtime Only |
Reference | Specify this component in hierarchy |
Function |
UdonBehaviour.SendCustomEvent (string)
|
Argument | OnValueChanged |
Fields
NAME_ANIMATOR
The property name of the animator.
Declaration
public const string NAME_ANIMATOR = ""
Field Value
Type | Description |
---|---|
System.String |
NAME_PARAMETER
The property name of the parameter.
Declaration
public const string NAME_PARAMETER = "parameter"
Field Value
Type | Description |
---|---|
System.String |
NAME_TOGGLE
The property name of the toggle.
Declaration
public const string NAME_TOGGLE = ""
Field Value
Type | Description |
---|---|
System.String |
Methods
OnValueChanged()
Callback for when the value of the toggle changes.
Declaration
public void OnValueChanged()