Search Unity

  1. New Unity Live Help updates. Check them out here!

    Dismiss Notice

[Solved] Editor Only Custom attribute

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

  1. as3mbus

    as3mbus

    Joined:
    Dec 5, 2016
    Posts:
    51
    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:
    841
    The TagSelectorAttribute.cs file should go outside of the Editor folders, while the TagSelectorPropertyDrawer.cs file should go inside of an Editor folder.
     
  3. as3mbus

    as3mbus

    Joined:
    Dec 5, 2016
    Posts:
    51
    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
     
unityunity