Editor script is working fine but he is not in Editor folder how can it be ?

I just want to know. The script is working fine but I thought that any editor script must be in Editor folder.

Try press BUILD. You’ll get errors. :slight_smile:

If you want part of a script to use Editor stuff, guard those lines with #if UNITY_EDITOR directives and they can live anywhere you like (well, probably not in Plugins).

I do that all the time, just to keep from splitting up stuff related to a simple small class into two files.

For instance:

That has some app-level values and also some editor-only code.