Scripting API

LayerMask

struct in UnityEngine · UnityEngine.CoreModule

5 of 5 of Unity's membersUnity's documentation
In Tassix

A bit mask of the 32 layers. Layer names are Unity's built-in ones, or a Unity project's (ProjectSettings/TagManager.asset) once it's opened.

Properties 1

int value { get; set; }

Methods 3

static int GetMask(params string[] layerNames)

Mask of the named layers; unknown names are ignored.

static string LayerToName(int layer)
static int NameToLayer(string layerName)

The layer index, or -1 if no layer has that name.

Operators 1

static implicit operator int(LayerMask mask)
static implicit operator LayerMask(int intVal)