Search Unity

Add multiple layers to a gameobject

Discussion in 'Scripting' started by opeca, Apr 3, 2014.

  1. opeca

    opeca

    Joined:
    Sep 17, 2013
    Posts:
    19
    Hello All,

    If I have two layers, "Ignore Raycast" - default on 2, and "Custom" - created by me, on 8, how can I add only these two ones to the gameoject?

    May 1<<2 7<<8?

    Thank you!
     
  2. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    A GameObject can only be on a single layer at a time.