//initalises the GUI static void Init() { selectedObject = Selection.activeObject; if (selectedObject == null) { return; } MakeAnimations window = (MakeAnimations)EditorWindow.GetWindow(typeof(MakeAnimations)); window.Show(); }
static void Init() { //Grab the active object selectedObject = Selection.activeObject; //If the object doesn't exist, do nothing if (selectedObject == null) { return; } //Otherwise, create a new window MakeAnimations window = (MakeAnimations)EditorWindow.GetWindow(typeof(MakeAnimations)); //Show the window window.Show(); }