// draw GUI for material batcher void OnGUI() { currentAction = (Action)EditorGUILayout.EnumPopup("Action to perform: ", currentAction); profile = (NeoFurUtils.MaterialUtils.MaterialQuality)EditorGUILayout.EnumPopup("Type of Material:", profile); switch (currentAction) { case Action.BATCH: DoBatch(profile); break; case Action.DUPLICATE: NeoFurUtils.MaterialUtils.DuplicateMatsFromScene(profile); break; default: break; } if (GUILayout.Button("Cancel")) { Close(); _window = null; return; } }
//[MenuItem("Neoglyphic/NeoFur/(Experimental)/Material Factory", false, 0)] //[MenuItem("Assets/Neoglyphic/NeoFur/(Experimental)/Material Factory", false, 0)] static void CreateMaterialBatch() { _window = GetWindow <NeoFurMaterialFactoryWindow>(true, "NeoFur Material Factory", true); _window.position = new Rect(500, 500, 400, 400); _window.Show(); }