How to declare classes that are in the editor folder?

Hi Everyone,

I need to utilize a class in the editor folder during postprocessmodel.

It should be fine because both of my C# scripts are in the same directory. I have 1 processing custom variables, and the other setting up the scene based on those variables.

But I for the life of me can’t figure out how to use Class B within Class A.

I even created a namespace for it, but looking at the forums, people say I can’t use the script unless it’s part of a component on a gameObject?

Well I don’t have a game object as yet and I sure as hell want to avoid putting an editor only script on a gameobject that won’t be used at runtime.

Any thoughts?

Would help to have some example of what you mean.

If your “script” is in the Editor folder, why does it derive from MonoBehaviour?

If it doesn’t derive from MonoBehaviour, you can just create an instance of it like any other C# object;

MyType instance = new MyType();