Skip to content

LayerMaskExtensions

Namespace: SideXP.Core

public static class LayerMaskExtensions

Miscellaneous extension functions for working with LayerMask values.

Methods

GetLayerIndices(LayerMask)

public static int[] GetLayerIndices(LayerMask mask)

Gets the indices of the layers (from 0 to 31 included) as defined in the project settings from a given mask value.

Parameters

  • mask: The mask value, which may represent several layers.

Returns

Returns the indices extracted from the given mask value.

GetLayerIndices(int)

public static int[] GetLayerIndices(int mask)

Gets the indices of the layers (from 0 to 31 included) as defined in the project settings from a given mask value.

Parameters

  • mask: The mask value, which may represent several layers.

Returns

Returns the indices extracted from the given mask value.