Search Results for

    Show / Hide Table of Contents

    Class GlobalSlider

    The component synchronizes the value of the Slider UI component.

    Inheritance
    System.Object
    SyncBehaviour
    GlobalSlider
    Inherited Members
    SyncBehaviour.NAME_SUBJECT
    SyncBehaviour.Initialized
    SyncBehaviour.ChangeOwner()
    SyncBehaviour.Sync()
    SyncBehaviour.OnDeserialization()
    SyncBehaviour.OnPlayerJoined(VRCPlayerApi)
    SyncBehaviour.IsOwner()
    SyncBehaviour.OnEnable()
    Namespace: black.kit.toybox
    Assembly: cs.temp.dll.dll
    Syntax
    public sealed class GlobalSlider : SyncBehaviour
    Remarks

    Usage (in the inspector of Unity Editor):

    1. 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.
    2. Set the following to OnValueChanged (Single) of the tied Slider component.
    EmissionRuntime Only
    ReferenceSpecify this component in hierarchy
    Function UdonBehaviour.SendCustomEvent (string)
    ArgumentOnValueChanged

    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
    SyncBehaviour.Initialize()

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