Search Results for

    Show / Hide Table of Contents

    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):

    1. 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.
    2. Deploy this component on the same object as the Toggle component or manually link it.
    3. Set the following to OnValueChanged (Boolean) of the tied Toggle component.
    EmissionRuntime Only
    ReferenceSpecify this component in hierarchy
    Function UdonBehaviour.SendCustomEvent (string)
    ArgumentOnValueChanged

    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()
    In This Article
    Back to top Example Unity documentation