Init(args)
Scripting Reference
Loading...
Searching...
No Matches

◆ SetEnabled()

static void Sisus.Init.IEnableableExtensions.SetEnabled ( this IEnableable enableable,
bool value )
static

Sets the enabled state of the object.

If the object has a Wrapper<TWrapped> component, then this sets its Behaviour.enabled state.

If this object does not have a Wrapper<TWrapped> component, and it implements IUpdate, ILateUpdate or IFixedUpdate, then the enabled state controls whether the object is subscribed to receive callbacks during those events.

If this object does not have a wrapper, and does not implement any of the above interfaces, then this always returns true.

Disabled objects won't receive callbacks during the IUpdate.Update, ILateUpdate.LateUpdate, or IFixedUpdate.FixedUpdate events.

Parameters
enableableThe object whose enabled state to set.
valueThe enabled state to set.