Unity Editor Macros

Posted by on Jun 15, 2012 in Tips & Tricks | 1 comment

A while back the guys at unity released a version of their editor with macros enabled (by accident) in the current version is has been removed/disabled. (this because it’s something they use for testing and not meant for production environments)
But with recent endeavours I found it’s possible to enable it in the editor making debugging stuff within the editor more entertaining, plus it adds a new window to the editor making your editor more of an editor.
Please note this is not documented by unity and probably not supported either.

Simple script:

using UnityEditor;
using UnityEditorInternal;
public class EnableMacros : Editor {
    [MenuItem ("Window/Macros")]
    static void Init () {
		MacroWindow win = (MacroWindow)EditorWindow.CreateInstance<MacroWindow>();
		win.Show();
    }
}

How to use:
Place this script in an Editor directory in your Assets and then:
Go to Window->Macros and tadaa.. you have a new editor window that can record all your editor actions and execute new ones.
May this help you on your endeavors of making cool new stuff for unity

One Comment

  1. genial!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>