Is there a way to have editor only objects? For example, I have a Cubemap Renderer object that will only ever be used in the editor. It has a camera on it, so it can’t be in the game at run time. Disabling/enabling is a bit inconvenient, so I was hoping for an automated way of doing it. I figured either a DebugOnly behavior or maybe another way to use some sort of tag already included with Unity?
If I were to use a DebugOnly behavior, how could I make it not include it in the build? Perhaps and editor script?
Thanks for the responses, guys. I figured an OnEnable function to disable the object during runtime would suffice as a last resort, but it would be nice to prevent the object from even making it into the build. I thought maybe a build preprocessor, but then how could I tell it to not include the object in the build at all?
The EditorOnly tag would not remove the entire GameObject from the build, if I am understanding it correctly. I am going to have quite a lot of objects in my hierarchy view at runtime, so minimal objects would be nice.