Class LazySwitch
A multi-purpose switch.
[BindEvent(typeof(Button), "onClick", "Interact")]
[BindEvent(typeof(Toggle), "onValueChanged", "Interact")]
public class LazySwitch : UdonSharpEventSender
- Inheritance
-
LazySwitch
- Inherited Members
- Extension Methods
Properties
State
The current state of this switch.
public int State { get; set; }
Property Value
Methods
Interact()
public override void Interact()
OnDeserialization()
public override void OnDeserialization()
OnPreSerialization()
public override void OnPreSerialization()
_SwitchState()
Switch to the next state, or a random state if randomized.
public void _SwitchState()
Remarks
This method bypasses interaction checks, so it can be called from other scripts or events.