-
-
Notifications
You must be signed in to change notification settings - Fork 0
IL_LayerToggle
Namespace: Lowry.UI.InputLayers
public sealed class IL_LayerToggle : MonoBehaviour
For use in the Inspector only.
Allows the use of InputLayers in the Unity inspector.
This script is designed to expose an InputLayer in the Unity Inspector.
It lets you Activate() or Deactivate() the layer either on Start/Destroy, or manually using UnityEvents🔗.
Along with the IL_LayeredAction script, it lets you make full use of InputLayers directly from within the Unity Editor interface.
private InputLayer _layer;
The IL_Layer that will be controllable through the inspector.
private bool _activateOnStart = true;
If
true
, the _layer will be activated when the object is loaded.
private bool _deactivateOnDestroy = true;
If
true
, the _layer will be deactivated when the object is destroyed.
public void Activate ()
Tries to activate the _layer.
Note: The layer will only become active if there are active layers at a higher IL_PriorityLayer within the IL_ScriptableRefs.r_priorities list.
public void Deactivate ()
Deactivates the _layer.
👉🏻 Download InputLayers on the Unity Asset Store!