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

[Solved] Editor Only Custom attribute

Discussion in 'Scripting' started by as3mbus, Mar 27, 2020.

  1. as3mbus

    as3mbus

    Joined:
    Dec 5, 2016
    Posts:
    71
    i am trying to use solution by SohailBukhari in

    https://answers.unity.com/questions/1378822/list-of-tags-in-the-inspector.html

    it went fine on editor until i tried to build the project. it keeps asking missing reference to said script.
    i've tried to separate the script in different folder, assigning different assembly definition and set it to editor specific(assembly definition) but to no avail.

    i dont want to litter my code with multiple define symbol for such simple attribute is there a way to fix this ?
     
  2. Madgvox

    Madgvox

    Joined:
    Apr 13, 2014
    Posts:
    1,317
    The TagSelectorAttribute.cs file should go outside of the Editor folders, while the TagSelectorPropertyDrawer.cs file should go inside of an Editor folder.
     
    SamClothier, Bunny83 and Alfie_E_ like this.
  3. as3mbus

    as3mbus

    Joined:
    Dec 5, 2016
    Posts:
    71
    ah i see. i am trying to cheat my folder cleanliness by combining the drawer and into one script.

    thank you it is solved.

    p.s. i'm sorry i havent searched for the forums before asking here since i just got panic where i want to present this but i can't build it before