その先にあるもの…

LayerMask 본문

프로그래밍/Unity

LayerMask

specialJ 2015. 12. 22. 11:14
  1. // Turn on the bit using an OR operation:
  2. private void Show() {
  3. camera.cullingMask |= 1 << LayerMask.NameToLayer("SomeLayer");
  4. }

  5. // Turn off the bit using an AND operation with the complement of the shifted int:
  6. private void Hide() {
  7. camera.cullingMask &= ~(1 << LayerMask.NameToLayer("SomeLayer"));
  8. }
  9. // Toggle the bit using a XOR operation:
  10. private void Toggle() {
  11. camera.cullingMask ^= 1 << LayerMask.NameToLayer("SomeLayer");
  12. }


출처 : http://answers.unity3d.com/questions/348974/edit-camera-culling-mask.html

'프로그래밍 > Unity' 카테고리의 다른 글

CombineMeshes  (0) 2015.10.07
LightMap 스크립트에서 불러오기  (0) 2015.09.14
Surface Shader  (0) 2015.09.02
shuriken rotation  (0) 2015.09.01
Caemra::CopyFrom  (0) 2015.08.19
Comments