- Home /
Using unity interface commands with scripts
Is it possible to use the unity menu interface using scripts. For example if I want to create an asset folder from the menu Assets->Create->Folder can i do so with a script command? I want to be able to write scripts that can generate entire unity game program code and build it.
Answer by duck · Apr 30, 2010 at 01:21 PM
Yes, Unity provides extensive support for "Editor Scripting" as it is called. Using editor scripting, you can control and do pretty much anything that Unity's own UI does. You can also extend Unity's UI by making custom inspector panels, pop up 'wizards' and custom menu items.
Check out the Editor Classes in Unity's scripting manual. You'll have to do a lot of reading, and the documentation, examples and tutorials are generally sparser than regular Unity functions.
You will probably also want to look through the existing collection of Editor Scripts on the Unity Wiki.
However, for your specific example, you need only create a normal folder using .net's IO classes (and in this case in particular, the Directory class).