using System.Collections.Generic; using System.IO; using UnityEditor; using UnityEngine; using UnityEngine.UIElements; using UnityEditor.UIElements; using UnityEngine.Localization; public enum selectionType { Questline, Quest, Step, Dialogue, } public class QuestEditorWindow : EditorWindow { private StepSO _currentSelectedStep = default; private QuestSO _currentSeletedQuest = default; private QuestlineSO _currentSelectedQuestLine = default; private int _idQuestlineSelected = default; private int _idQuestSelected = default; private int _idStepSelected = default; [MenuItem("ChopChop/QuestEditorWindow")] public static void ShowWindow() { QuestEditorWindow wnd = GetWindow(); wnd.titleContent = new GUIContent("QuestEditorWindow"); // Sets a minimum size to the window. wnd.minSize = new Vector2(250, 250); } public static void ShowArtistToolWindow() { // Opens the window, otherwise focuses it if it’s already open. QuestEditorWindow window = GetWindow(); // Adds a title to the window. window.titleContent = new GUIContent("QuestEditorWindow"); // Sets a minimum size to the window. window.minSize = new Vector2(250, 250); //window.SetTool(); } public void CreateGUI() { VisualElement root = rootVisualElement; // Import UXML var visualTree = Resources.Load("QuestEditorWindow"); root.Add(visualTree.CloneTree()); //Import USS var styleSheet = Resources.Load("QuestEditorWindow"); root.styleSheets.Add(styleSheet); //Register button event Button refreshQuestPreviewBtn = root.Q