private void OnGUI()
        {
            if (GUILayout.Button("Delete Level"))
            {
                DeleteExistingLevel();
            }

            if (GUILayout.Button("Duplicate Level"))
            {
                DuplicateAnExistingLevel();
            }

            if (GUILayout.Button("Add New Scene to Level"))
            {
                AddNewSceneToSelectedLevel();
            }

            if (GUILayout.Button("Delete Scene From Level"))
            {
                DeleteSceneFromExistingLevel();
            }

            if (GUILayout.Button("Rename Level"))
            {
                RenameExistingLevel();
            }

            if (GUILayout.Button("Change Level Category"))
            {
                AssignCategoryToLevel.OpenMenu();
            }

            if (GUILayout.Button("Rename Scene"))
            {
                RenameScene();
            }

            if (GUILayout.Button("Add Existing Independent Scene to Level"))
            {
                AddExistingSceneToExistingLevel();
            }

            if (GUILayout.Button("Decouple Scene from Level"))
            {
                DecoupleSceneFromLevel();
            }
            if (GUILayout.Button("Add a Dependency to a Level"))
            {
                AddDependencyToLevelWindow.OpenMenu();
            }
            if (GUILayout.Button("Remove a Dependency From Level"))
            {
                RemoveLevelDepdendencyWindow.OpenMenu();
            }

            if (GUILayout.Button("Add A Level to Scenes Build Index"))
            {
                AddLevelToBuildWindow.OpenMenu();
            }
        }
Beispiel #2
0
        public static void OpenMenu()
        {
            window = GetWindow <AssignCategoryToLevel>("Assign Category To Level");
            window.gameLevelData = GameLevelToolkitWindow.GetGameLevelsData();
            window.selectedValue = 0;
            window.levels        = window.gameLevelData.gameLevelsCreatedByUser.ToArray();
            List <string> levelsToString = new List <string>();

            foreach (GameLevel item in window.levels)
            {
                levelsToString.Add(item.gameLevelName);
            }
            window.levelOptionsToLoad = levelsToString.ToArray();
        }