public static void Init()
        {
            StoryEditorWindow window = (StoryEditorWindow)EditorWindow.GetWindow(typeof(StoryEditorWindow));

            window.Set();
            window.Show();
        }
Exemple #2
0
 //GUI Button to serialize conversation to Json file after edited in inspector
 public override void OnInspectorGUI()
 {
     serializedObject.Update();
     DrawDefaultInspector();
     if (GUILayout.Button("Edit"))
     {
         StoryEditorWindow.Init();
     }
     serializedObject.ApplyModifiedProperties();
     return;
 }
        //initialisation method with a sent property to display
        public static void Init(SerializedProperty sentProperty)
        {
            StoryEditorWindow window = (StoryEditorWindow)EditorWindow.GetWindow(typeof(StoryEditorWindow));

            window.Set();
            if (window.propertyList == null)
            {
                window.propertyList = new List <SerializedProperty>();
            }
            window.propertyList.Add(sentProperty);
            window.Show();
        }