public override void OnInspectorGUI() { if (GUILayout.Button("Open Editor")) { PatrolPathEditorWindow.Open((PatrolPath)target); } }
public static void Open(PatrolPath patrolPathObject) { PatrolPathEditorWindow window = GetWindow <PatrolPathEditorWindow>("Path Patrol Editor"); window.serializedObject = new SerializedObject(patrolPathObject); }