示例#1
0
        void OnGUI()
        {
            // Validate prefs:
            if (prefs == null)
            {
                prefs = UniqueIDWindowPrefs.Load();
            }
            if (prefs.databases == null)
            {
                prefs.databases = new List <DialogueDatabase>();
            }

            // Draw window:
            scrollPosition = EditorGUILayout.BeginScrollView(scrollPosition);
            try
            {
                EditorGUILayout.HelpBox("This tool reassigns IDs so all Actors, Items, Locations, Conversations have unique IDs. " +
                                        "This allows your project to load multiple dialogue databases at runtime without conflicting IDs. " +
                                        "Actors, Items, and Locations with the same name will be assigned the same ID. " +
                                        "All conversations will have unique IDs, even if two conversations have the same title.",
                                        MessageType.None);
                DrawDatabaseSection();
                DrawButtonSection();
            }
            finally
            {
                EditorGUILayout.EndScrollView();
            }
        }
示例#2
0
 void OnEnable()
 {
     minSize = new Vector2(340, 128);
     if (prefs == null)
     {
         prefs = UniqueIDWindowPrefs.Load();
     }
 }
示例#3
0
 /// <summary>
 /// Draws the Clear button, and clears the prefs if clicked.
 /// </summary>
 private void DrawClearButton()
 {
     if (GUILayout.Button("Clear", GUILayout.Width(100)))
     {
         prefs.Clear();
         UniqueIDWindowPrefs.DeleteEditorPrefs();
     }
 }
示例#4
0
 void OnGUI()
 {
     if (prefs == null) prefs = UniqueIDWindowPrefs.Load();
     scrollPosition = EditorGUILayout.BeginScrollView(scrollPosition);
     try {
         EditorGUILayout.HelpBox("This tool reassigns IDs so all Actors, Items, Locations, Conversations have unique IDs. " +
                                 "This allows your project to load multiple dialogue databases at runtime without conflicting IDs. " +
                                 "Actors, Items, and Locations with the same name will be assigned the same ID. " +
                                 "All conversations will have unique IDs, even if two conversations have the same title.",
                                 MessageType.None);
         DrawDatabaseSection();
         DrawButtonSection();
     } finally {
         EditorGUILayout.EndScrollView();
     }
 }
示例#5
0
 void OnEnable()
 {
     minSize = new Vector2(340, 128);
     if (prefs == null) prefs = UniqueIDWindowPrefs.Load();
 }