Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Setting up layer names through CustomEditor

Discussion in 'Scripting' started by SantosR, Oct 23, 2014.

  1. SantosR

    SantosR

    Joined:
    Dec 18, 2013
    Posts:
    27
    I want to set the names of layers in the "Tags and Layers" project settings panel through a CustomEditor script. Is it possible?

    I'm having a hard time finding it in the UnityEditor script reference.

    Thanks
     
  2. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,726
    You're not supposed to change layers in editor scripts (since you're supposed to leave this to Unity itself), but Leslie Young wrote a good explanation of how to do it anyway.
     
  3. SantosR

    SantosR

    Joined:
    Dec 18, 2013
    Posts:
    27
    Thanks!!