What's the purpose of UnityEditor classes?

From what I’ve read:

"The Editor folder name is a special name which allows your scripts access to the Unity Editor Scripting API.
Scripts inside an Editor folder will not be included in your game’s build. They are only used in the Unity Editor."

So what’s the purpose of them? Are they strictly used by folks that are, for example, developing tools for the Asset Store to be used by other developers to increase the functionality of Unity itself? Are they of any use to developers that are strictly working on commercial games, for instance?

They’re used by anyone who wants to write custom editors.

May it be a custom inspector for a script you wrote.

Or a propertydrawer for a specific type/attribute you set up.

Or an editor window.

This may be for tools that you sell in the asset store. This could be for internal usage for yourself, or your team.

1 Like

Or, If you find that you are doing something again and again in the editor while creating levels, etc, you can write script to automate it for you, using the Editor classes

1 Like

Excellent, that’s what I figured. Thank you gentlemen.

The core concept is that Unity becomes your game’s specialised editor. Each game you make, customises the editor to become the perfect editor for your game. It’s shocking how many people miss how important this is. You don’t even need to restart the editor! As far as I know it’s the only competitive all purpose game engine that allows this.

At least that’s been the case for all our titles so far and the one in dev.