Exemple #1
0
        private void drawSectionSelect() //总体的区域选择
        {
            int sectionIndex = -1;

            EditorGUILayout.BeginHorizontal();
            for (int i = 0; i < sectionSelectTip.Length; i++)
            {
                GUIStyle style = GUI.skin.button;
                if (activeSection == sectionSelectSections[i])
                {
                    style = GUI.skin.box;
                }
                if (GUILayout.Button(new GUIContent(sectionSelectTip[i], sectionSelectTip[i]), style, GUILayout.Height(36), GUILayout.Width(80)))
                {
                    sectionIndex = i;
                }
            }
            EditorGUILayout.EndHorizontal();
            if (sectionIndex != -1)
            {
                activeSection = sectionSelectSections[sectionIndex];
                for (int i = 0; i < sectionSelectSections.Length; i++)
                {
                    if (sectionSelectSections[i] != null)
                    {
                        sectionSelectSections[i].isActive = false;
                    }
                }

                if (activeSection != null)
                {
                    activeSection.isActive = true;
                }
            }
        }
Exemple #2
0
 void OnEnable()
 {
     //terrainCreator = new TerrainSliceCreator(this);
     //terrainCreator.OnEnable();
     //objectSlice = new SceneObjectSlice(this);
     //objectSlice.OnEnable();
     //terrain2Mesh = new Terrain2Mesh(this);
     //terrain2Mesh.OnEnable();
     lightBaker = new BatchLightBaker(this);
     lightBaker.OnEnable();
     //quadTreeTool = new QuadTreeTool(this);
     //quadTreeTool.OnEnable();
     sectionSelectSections = new EditorWindowSection[] { lightBaker };
     activeSection         = lightBaker;
     //activeSection = terrainCreator;
 }