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