Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

I got this script right here and I need to turn off a layer.

Discussion in 'Scripting' started by NutellaDaddy, Jan 12, 2014.

  1. NutellaDaddy

    NutellaDaddy

    Joined:
    Oct 22, 2013
    Posts:
    288
    I need to make it so that when this becomes active the other layer before this becomes inactive. Any help?


    Code (csharp):
    1. void OnMouseButtonUp()
    2.                 {
    3.                        if(isOptions == true)
    4.                              {
    5.                                  Camera.cullingMask |=(1<<LayerMask.NameToLayer("NameOfLayer");
    6.                      }
    7. }