Skip to content

Behaviour Extension

Andrzej Kebab edited this page Feb 2, 2024 · 1 revision

UtilityLibrary.Unity.Runtime

Enable<T>

Enables a Behaviour instance.

// Example of usage
MonoBehaviour scriptInstance = // Obtain a MonoBehaviour instance;
scriptInstance.Enable();

Parameters:

  • behaviour: The Behaviour instance to enable.

Returns:

  • behaviour: The enabled Behaviour instance.

Disable<T>

Disables a Behaviour instance.

// Example of usage
MonoBehaviour scriptInstance = // Obtain a MonoBehaviour instance;
scriptInstance.Disable();

Parameters:

  • behaviour: The Behaviour instance to disable.

Returns:

  • behaviour: The disabled Behaviour instance.

Clone this wiki locally