예제 #1
0
        public static void OpenToolWindow()
        {
            if (window != null)
            {
                window.Close();
            }

            window = (TPOptionsToolsWindow)GetWindow(typeof(TPOptionsToolsWindow));

            currentScene = EditorSceneManager.GetActiveScene().name;
            EditorApplication.hierarchyWindowChanged += hierarchyWindowChanged;

            window.minSize = new Vector2(windowSize, windowSize);
            window.maxSize = new Vector2(windowSize, windowSize);
            window.Show();
            AssetDatabase.OpenAsset(TPOptionsDesigner.OptionsCreator.OptionsLayout);
        }
예제 #2
0
        void DrawTools()
        {
            GUILayout.BeginArea(toolSection);
            GUILayout.Label("Options Manager - Tools", skin.box);

            if (OptionsCreator == null)
            {
                GUILayout.EndArea();
                return;
            }

            if (GUILayout.Button("Options Menu Layout", skin.button, GUILayout.Height(60)))
            {
                TPOptionsToolsWindow.OpenToolWindow(/*TPMenuToolsWindow.ToolEnum.Options*/);
            }
            //if (GUILayout.Button("Main Menu", skin.button, GUILayout.Height(60)))
            //{
            //    TPMenuToolsWindow.OpenToolWindow(TPMenuToolsWindow.ToolEnum.MainMenu);
            //}
            GUILayout.EndArea();
        }