Scripting API
Scripting API
LayerMatrix
Struct in Abyss.Core, from Abyss.Core.
Which of a project's 32 layers meet which: a tick for each pair, the same both ways — Default and Player meet, or neither meets the other. What Physics 2D's settings say collides, shown in Project Settings as a triangle of ticks by the layers' names.
public struct LayerMatrixRemarks
Held as a row a layer, each the LayerMask of the layers it meets, so what one layer meets is one mask to test a contact's other layer against. default is LayerMatrix.None; settings start from LayerMatrix.All.
Properties
All
public static LayerMatrix All { get; }Every layer meeting every other, and itself.
None
public static LayerMatrix None { get; }No layer meeting any.
Methods
Meet
public readonly bool Meet(int layer, int other)Whether layers layer and other meet.
Parameters
layerother
Exceptions
ArgumentOutOfRangeException: A number is not one of the 32.
MetBy
public readonly LayerMask MetBy(int layer)The layers layer meets.
Parameters
layer
Exceptions
ArgumentOutOfRangeException: The number is not one of the 32.
Set
public void Set(int layer, int other, bool meet)Has layers layer and other meet, or not, both ways.
Parameters
layerothermeet
Exceptions
ArgumentOutOfRangeException: A number is not one of the 32.
Equals
public readonly bool Equals(LayerMatrix other)Parameters
other
Equals
public override readonly bool Equals(object? obj)Parameters
obj
GetHashCode
public override readonly int GetHashCode()Operators
operator ==
public static bool operator ==(LayerMatrix left, LayerMatrix right)Whether two say the same of every pair.
Parameters
leftright
operator !=
public static bool operator !=(LayerMatrix left, LayerMatrix right)Whether two say otherwise of a pair.
Parameters
leftright
