GameObjectExtensions.IsInLayerMask(GameObject, LayerMask) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Determines whether or not a game object's layer is included in the specified layer mask.
public:
[System::Runtime::CompilerServices::Extension]
static bool IsInLayerMask(UnityEngine::GameObject ^ gameObject, UnityEngine::LayerMask layerMask);
public static bool IsInLayerMask (this UnityEngine.GameObject gameObject, UnityEngine.LayerMask layerMask);
static member IsInLayerMask : UnityEngine.GameObject * UnityEngine.LayerMask -> bool
<Extension()>
Public Function IsInLayerMask (gameObject As GameObject, layerMask As LayerMask) As Boolean
Parameters
- gameObject
- UnityEngine.GameObject
The game object whose layer to test.
- layerMask
- UnityEngine.LayerMask
The layer mask to test against.
Returns
True if gameObject
's layer is included in layerMask
, false otherwise.