How extend Unity3d editor
There is no real way to make a permanent extension (i.e. an extension that is there for every new project). You can however export your extension as a Unity package and import this whenever you create a new project. As per the documenentation on the linked page:
- In the Project View, select all the asset files you want to export.
- Choose Assets->Export Package... from the menubar.
- Name and save the package anywhere you like.
- Open the project you want to bring the assets into.
- Choose Assets->Import Package... from the menubar.
- Select your package file saved in step 3.
That should be the simplest way to easily import your custom extensions into each project.
For plugins intended to be used in many projects, but not changed in that project. Some people choose to build the plugin into a dll, then place the dll in the project rather than it's source code.
http://docs.unity3d.com/Manual/UsingDLL.html
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using System.IO;
public class MenuSystem : Editor
{
[MenuItem("Backup/Take Backup")]
public static void ExportBackUp()
{
string[] paths = new string[]
{
"Assets"
};
Debug.Log(paths);
AssetDatabase.ExportPackage(paths, "Backup.unitypackage", ExportPackageOptions.Recurse);
}
}