Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetLayerMask(params string[])

Get a PhysicsMask for the specified layer name(s).
Read time 1 minuteLast updated 10 days ago

Definition

GetLayerMask(string[])

public static PhysicsMask GetLayerMask(params string[] layerNames)

Parameters

layerNames

The layer names (case sensitive) to find a combined physics mask for.

Returns

Type

Description

PhysicsMaskThe combined physics mask associated with the specified layer names or, if not found, PhysicsMask.None will be returned in which case a console warning will also be produced.