Beispiel #1
0
        public void OnDisable()
        {
            _heightCurveEditor.RemoveAll();
            _steepnessCurveEditor.RemoveAll();

            _terrainSystemPro = (TerrainSystemPro)target;
            if (_terrainSystemPro)
            {
                _terrainSystemPro.ShowTerrainHeatmap(false);
            }
        }
Beispiel #2
0
        public override void OnInspectorGUI()
        {
            _terrainSystemPro       = (TerrainSystemPro)target;
            OverrideLogoTextureName = "Banner_TerrainSystem";
            LargeLogo = false;
            base.OnInspectorGUI();


            if (_terrainSystemPro.VegetationSystemPro == null)
            {
                EditorGUILayout.HelpBox("This component needs to be added to a GameObject with a VegetationSystemPro component.", MessageType.Warning);
                return;
            }

            if (_terrainSystemPro.VegetationPackageIndex >=
                _terrainSystemPro.VegetationSystemPro.VegetationPackageProList.Count)
            {
                _terrainSystemPro.VegetationPackageIndex = 0;
            }

            _terrainSystemPro.CurrentTabIndex = GUILayout.SelectionGrid(_terrainSystemPro.CurrentTabIndex, TabNames, 3, EditorStyles.toolbarButton);
            switch (_terrainSystemPro.CurrentTabIndex)
            {
            case 0:
                DrawSettingsInspector();
                break;

            case 1:
                DrawEditBiomeSplatmapsInspector();
                break;

            case 2:
                DrawEditTerrainTexturesInspector();
                break;

            case 3:
                DrawDebugInspector();
                break;
            }

            if (_terrainSystemPro.CurrentTabIndex != 1)
            {
                _terrainSystemPro.ShowTerrainHeatmap(false);
            }
            else
            {
                _terrainSystemPro.UpdateTerrainHeatmap();
            }
        }