/// <summary> /// CREATE INSTANCER /// </summary> void DrawCreateInstancer() { EditorGUILayout.BeginVertical("Button"); //GUILayout.Space(7); EditorGUI.indentLevel++; showCreationUI.boolValue = EditorGUILayout.Foldout(showCreationUI.boolValue, "Create Instancer"); EditorGUI.indentLevel--; if (showCreationUI.boolValue) { EditorGUILayout.PropertyField(currInstancerType, new GUIContent("Type")); if (GUILayout.Button("Create")) { //Debug.Log("Creating"); string theType = currInstancerType.enumNames[currInstancerType.enumValueIndex]; //Debug.Log(theType); switch (theType) { case "Floor": SS_Common.SS_CreateFloor(Target.gameObject); break; case "Wall": //Debug.Log("Creating Wall"); SS_Common.SS_CreateWall(Target.gameObject); break; case "GridInstance": SS_Common.SS_CreateGridInsts(Target.gameObject); break; case "Scatter": SS_Common.SS_CreateGridScatters(Target.gameObject); break; case "Shape": break; default: break; } } } //GUILayout.Space(7); EditorGUILayout.EndVertical(); }