- Home /
I want to add a custom menu to Unity IDE
I want to add a new custom menu to the UNITY IDE so that i can run custom scripts to package the application rather than packing it in the way that unity provides.
Basically i want to extend the functionality of Unity IDE something similar to a plugin development for eclipse.
I came to know about Editor scripts but it seems these are used for making new windows only.
Also the plugins in unity is a different concept and it is used in extending the flash functionality.
I am new to Unity so please guide me even if it is something very easy.
Answer by whydoidoit · Apr 02, 2013 at 09:53 AM
In any class derived from EditorWindow you can ignore the window stuff and just make a menu:
[MenuItem("Window/SubMenu/Click Me", false, 0)]
static void DoSomething()
{
}
You can also add to the context menu/create new item menu etc.
Does this mean that the custom menu's are limited to a single project in which that script resides.
Can we write a script which can be used for all the projects that are being created in the IDE i.e $$anonymous$$enuItems similar to the one that IDE currently has (File/Build & Run) which is same for all the projects being created.
Only if you include the scripts or compile them into a DLL which is placed in the new project.
Normally you make a set of packages that you use to import common scripts into new projects. Turn on .meta files if you do this to try and keep the versions together.
Thanks WhyDoidoit. As of now i don't know about the concept of meta files and creating dll for a single script. I have to investigate more.
Your answer

Follow this Question
Related Questions
How to place Adv Vertically 1 Answer
How Set Java Plugin on Unity? 0 Answers
Make iOS build using Multiplatform Toolkit?? 2 Answers
Attach a script to GameObject in a DLL 0 Answers
Unity + AR = .exe 1 Answer