override public void OnInspectorGUI() { EditorGUI.BeginChangeCheck(); EditorGUILayout.BeginVertical(); if (GUILayout.Button("Add Checkpoint")) { GameObject instance = Resources.Load("checkpoint") as GameObject; GameObject new_point = Instantiate(instance, path_target.transform.position, Quaternion.identity) as GameObject; path_target.addCheckpoint(new_point); } if (GUILayout.Button("Clear List")) { path_target.clearList(); } EditorGUILayout.EndVertical(); EditorGUILayout.BeginVertical(); drawPathObjects(); EditorGUILayout.EndVertical(); }