- Home /
Is there a system for automating the interface, like Maxscript?
I'm curious if you can use scripting for automating tasks in Unity. Thanks.
Answer by Bunny83 · Sep 27, 2012 at 01:12 PM
Well, it depends on the tasks but basically: yes.
You can write editor scripts to do what ever you want. You can load / save a scene. You can instantiate prefabs you can import new assets you can create prefabs, almost everything you can do in Unity with some exceptions (Even those can get working with some reflection "hacks" ;))
Of course there's no dedicated scripting language for this. Just use the API as you do at runtime. Keep in mind the UnityEditor namespace has a lot additional classes. for example when you want to instantiate a prefab and want to keep the prefab connection, you have to use PrefabUtility.InstantiatePrefab and not Instantiate.
Unity also has a batch mode where you can start the editor with some commandline parameters and have it running some editor scripts in your project.
You might want to have a look at the Extending The Editor pages
Answer by kork · Sep 09, 2014 at 07:15 PM
If you are not into scripting, you might want to have a look at uTomate. It allows you to automate a wide variety of tasks without scripting, just by configuring actions and arranging them into automation plans - all in the unity editor.
that broken link for Utomate is now here: http://www.ancientlightstudios.com/utomate/