StatefulInteractable.ForceSetToggled Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| ForceSetToggled(Boolean) |
Forcibly toggle the interactable and fire the relevant events. This is a single-arg overload for ForceSetToggled for use with UnityEvents. Consider using ForceSetToggled(bool, bool) instead, especially if you'd like to suppress the resulting toggle events. |
| ForceSetToggled(Boolean, Boolean) |
Forcibly toggle the interactable. |
ForceSetToggled(Boolean)
Forcibly toggle the interactable and fire the relevant events. This is a single-arg overload for ForceSetToggled for use with UnityEvents. Consider using ForceSetToggled(bool, bool) instead, especially if you'd like to suppress the resulting toggle events.
public void ForceSetToggled(bool active);
member this.ForceSetToggled : bool -> unit
Public Sub ForceSetToggled (active As Boolean)
Parameters
- active
- Boolean
Applies to
ForceSetToggled(Boolean, Boolean)
Forcibly toggle the interactable.
public void ForceSetToggled(bool active, bool fireEvents = true);
member this.ForceSetToggled : bool * bool -> unit
Public Sub ForceSetToggled (active As Boolean, Optional fireEvents As Boolean = true)
Parameters
- active
- Boolean
If true, this toggle will be set to active.
- fireEvents
- Boolean
Set to false if events and timers should not be fired. Useful when hydrating state from an external source on startup.