Last active
June 5, 2022 09:55
-
-
Save irfanbaysal/b3501098f918cacd67f1dff81ca53b8d to your computer and use it in GitHub Desktop.
Bitwise Operators by Using 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
// Render everything except layer 14 | |
camera.cullingMask = ~(1 << 14); | |
// Switch off layer 14, leave others as-is | |
camera.cullingMask &= ~(1 << 14); | |
Switch on layer 14, leave others as-is | |
camera.cullingMask |= (1 << 14); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment