is there a way to make a global editor plugin?

i want to make an editor script that works in every projects. I don’t need to import that plugin for each project. (or at least it automatically import it) Is it possible to do that?

Actually there is a way but it isn’t really documented anywhere and requires a bit of try and error. What i mean are “UnityExtensions”. Unity introduced those i think along with the new networking system UNet. UNet is actually an extension. If you haven’t ever heard about that before i suggest you go to your Unity installation folder and go into the “/Editor/Data/” subfolder. There you will find a folder called UnityExtensions. The actual extensions are in another subfolder called “Unity”. On Windows that’s usually C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\

The actual extension is simply a usual managed assembly which contains your classes. The actual tricky part is in the ivy.xml which defines your extension and which assemblies should be loaded. Ivy (Apache Ivy) was originally made for managing Java package dependencies. Most problems you might have will come from the fact that you do something wrong in that xml file and Unity simply doesn’t load your files at all ^^.

Your extension should show up in the modules menu inside the editor (Edit → modules) if everything is correct.

I did play around with it a few month ago and has a simple extension working properly. However don’t ask me how ^^. It seems to be important that each assembly has it’s own GUID, which one doesn’t matter as long as it’s unique. Just look at the modules that are already there for reference.

Note: Make sure your assemblies are “bug free” as they are loaded before your actual project. You should follow the usual procedure for assemblies so make sure you wrap your stuff in a namespace.

Also do not have your extension “live” inside the above mentioned folder. Whenever you update Unity, the installer will wipe out the folders and you have to put it back in manually.

That’s pretty much everything i know about that “hidden feature”. It’s not necessary to mention that since that’s not an official documented feature (yet), Unity could decide to change how it works or drop the support completely. So currently it should only be used for personal use.

You can create your own Custom package and “automatically” import it to any project or simply distribute among other developers. Also Unity allow you create updates for your packages.