Question by
Yamt · Aug 05, 2018 at 06:34 PM ·
gameobjecteditorcomponenttag
Why can't you add editor scripts to GameObjects even if the tag is EditorOnly?
I'm new to Unity so sorry if this is possible, but I'm trying to keep all editor related files in the Editor folder to keep unneeded files out of the game build.
I'm assuming you need the script to be outside of the Editor folder so that when you have the component on, it knows what it's referring to outside of the editor, but if you have the GameObject's tag set to EditorOnly then it shouldn't even be looking at the GameObject's components, right?
If this is possible or there's a work around to keep the files in the Editor folder please let me know, because I can't find anything about getting that to work.
Thank you.
Comment