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(); } }
void OnEnable() { minSize = new Vector2(340, 128); if (prefs == null) { prefs = UniqueIDWindowPrefs.Load(); } }
/// <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(); } }
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(); } }
void OnEnable() { minSize = new Vector2(340, 128); if (prefs == null) prefs = UniqueIDWindowPrefs.Load(); }