Skip to content

Commit

Permalink
Added MenuItem
Browse files Browse the repository at this point in the history
GameObject/Create Other/Cyan/To Do List (MonoBehaviour)
  • Loading branch information
Cyanilux authored Aug 11, 2020
1 parent b421242 commit f05c220
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ToDo/Editor/ToDoEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class ToDoEditor : Editor {
private ToDo todoList;
private ReorderableList reorderableList;

private static Color textColor;// = new Color(0.8f, 0.8f, 0.8f);
private static Color textColor;

private static Color focusColor = new Color(0, 170 / 255f, 187 / 255f, 0.5f);
private static Color activeColor = new Color(0, 170 / 255f, 187 / 255f, 0.3f);
Expand All @@ -29,6 +29,13 @@ private void Awake() {
todoList = target as ToDo;
}

[MenuItem("GameObject/Create Other/Cyan/To Do List (MonoBehaviour)")]
static void Create() {
GameObject obj = new GameObject("To Do");
obj.AddComponent<ToDo>();
Selection.activeGameObject = obj;
}

public override void OnInspectorGUI() {
//base.OnInspectorGUI();

Expand Down

0 comments on commit f05c220

Please sign in to comment.