Ejemplo n.º 1
0
        public static void Init()
        {
            ConversationEditorWindow window = (ConversationEditorWindow)EditorWindow.GetWindow(typeof(ConversationEditorWindow));

            window.Set();
            window.Show();
        }
Ejemplo n.º 2
0
        //initialisation method with a sent property to display
        public static void Init(SerializedProperty sentProperty)
        {
            ConversationEditorWindow window = (ConversationEditorWindow)EditorWindow.GetWindow(typeof(ConversationEditorWindow));

            window.Set();
            if (window.propertyList == null)
            {
                window.propertyList = new List <SerializedProperty>();
            }
            window.propertyList.Add(sentProperty);
            window.Show();
        }
Ejemplo n.º 3
0
        //GUI Button to serialize conversation to Json file after edited in inspector
        public override void OnInspectorGUI()
        {
            ConversationWriter conversationWriter = (ConversationWriter)target;

            serializedObject.Update();
            DrawDefaultInspector();
            if (GUILayout.Button("Edit"))
            {
                ConversationEditorWindow.Init();
            }
            serializedObject.ApplyModifiedProperties();
            return;
        }