Created
July 22, 2019 08:05
-
-
Save bartwttewaall/d13b12cdfebfd698809003ae5e12a3e0 to your computer and use it in GitHub Desktop.
Combining layers to define a cullingmask
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LayerMask everything = -1; | |
void Start () { | |
LayerMask uiMask = 1 << LayerMask.NameToLayer ("UI"); | |
cam.cullingMask = everything; | |
cam.cullingMask &= ~uiMask; // exclude UI layer | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment