Beispiel #1
0
    public static FSMModelEditorWindow CreateWindow(FSMModel model)
    {
        FSMModelEditorWindow window = (FSMModelEditorWindow)EditorWindow.GetWindow(typeof(FSMModelEditorWindow));

        window.model = model;
        window.Init();
        window.Show();
        return(window);
    }
Beispiel #2
0
    public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();
        FSMModel model = target as FSMModel;

        EditorGUILayout.BeginVertical();

        EditorGUILayout.BeginHorizontal();
        EditorGUILayout.LabelField("Name:");
        EditorGUILayout.TextField(model.name);
        EditorGUILayout.EndHorizontal();

        if (GUILayout.Button("Edit...", GUILayout.MinWidth(120)))
        {
            FSMModelEditorWindow.CreateWindow(model);
        }
        EditorGUILayout.EndVertical();
    }