Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
Close Submission failedFor some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.
Close Your name Your email Suggestion* Switch to Manual DescriptionInteger identifying the layer the GameObject is assigned to.
This is the standard integer value which identifies the layer, not the LayerMask. You can use layers for selective rendering from cameras or to ignore Raycasts. Unity generates 32 layers, identified by standard integers from 0 to 31, and reserves some layers for its own systems. Refer to Create functional layers in Unity for a list of predefined layers and how to create your own new ones.
To convert this layer
identifier to a LayerMask, refer to Set a layerMask. To obtain the string
name of the layer from this layer
identifier, use LayerMask.LayerToName. Refer to Layers in the Manual for a comprehensive guide to using layers.
Additional resources: LayerMask
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4