-
-
Notifications
You must be signed in to change notification settings - Fork 0
InputLayer
Namespace: Lowry.UI.InputLayers
public struct InputLayer : IComparable, IComparable<InputLayer>, IEquatable<InputLayer>
Represents an IL_Layer with an advanced custom inspector.
This structure is mainly for internal use, and it is unlikely that you will need to work with it directly.
Its main goal is to expose a custom property drawer for the Unity Inspector that can point to any IL_Layer you have configured within the InputLayers editor window.
This is a core component of the LayeredAction system.
public string name;
The name of the IL_Layer this is meant to represent.
Since layer names must be unique, this serves as the actual reference to the underlying IL_Layer.
public readonly IL_Layer _layer { get {...} }
Returns a direct reference to the IL_Layer that this structure represents.
public readonly Action onActivated { get {...} set {...} }
The event that gets triggered when the _layer is activated.
public readonly Action onDeactivated { get {...} set {...} }
The event that gets triggered when the _layer is deactivated.
public readonly int? _priority { get {...} }
The id of the IL_PriorityLayer that this layer belongs to within IL_ScriptableRefs.r_priorities.
Isnull
if the layer does not belong to any IL_PriorityLayer.
public readonly bool _isActive{ get {...} }
true
when this layer is currently the unique active layer.
public readonly bool? Activate () {...}
Tries to activate the _layer.
Returns:
true
when the layer has been activated (or was already active).false
when the layer has not been activated (it will still be added to the relevant stack).null
when the layer isn't present inside any of the IL_ScriptableRefs.r_priorities.
public readonly void Dectivate () {...}
Tries to deactivate the _layer.
public InputLayer (string name_) {...}
Sets the layer reference using a layer name
string
.
public InputLayer (IL_Layer layer) {...}
Sets the layer reference using a direct reference to an IL_layer.
All the IComparable
and IEquatable
implementations are built by comparing name values as it is used as the reference to this structure's underlying IL_Layer.
👉🏻 Download InputLayers on the Unity Asset Store!