示例#1
0
    /// <summary>
    /// The main InspectorGUI code, every widget drawer gets called here
    /// </summary>
    public override void OnInspectorGUI()
    {
        if (!WasInitialised)
        {
            OnActivate();
        }
        if (target != null)
        {
            if (!EditorInitialized)
            {
                OnActivate();
            }
            if (Script.TerrainInfo != null)
            {
                DrawDevelWidget();
                DrawErosionTypeProperties();
                _NoiseParameterEditor.DrawNoiseParameterGUI(TerrainInfo, EditorWidgetFoldouts);
            }
        }
        DrawTerrainSizeWidget();
        _ParameterPresetEditor.DrawLoadSaveGUI(TerrainInfo, EditorWidgetFoldouts);
        _ParameterPresetEditor.DisplayParameterList().DoLayoutList();

        EditorGUILayout.LabelField("Run the project to initialise the controls!");
    }
示例#2
0
    /// <summary>
    /// The main InspectorGUI code, every widget drawer gets called here
    /// </summary>
    public override void OnInspectorGUI()
    {
        if (!WasInitialised)
        {
            OnActivate();
        }
        if (target != null)
        {
            if (!EditorInitialized)
            {
                OnActivate();
            }
            if (Script.TerrainInfo != null)
            {
                DrawDevelWidget();
                DrawRoadGenerationWidget();
                DrawErosionTypeProperties();
                _NoiseParameterEditor.DrawNoiseParameterGUI(Script, TerrainInfo, EditorWidgetFoldouts);
                _EditorSeasonalChange.DrawSeasonalChangeGUI(TerrainInfo);
                // should always be running after terrainInfo is avaliable, cant be run in editor
                //_EditorSeasonalChange.SeasonalChangeUpdate(TerrainInfo);
            }
        }
        DrawTerrainSizeWidget();
        _ParameterPresetEditor.DrawLoadSaveGUI(TerrainInfo, EditorWidgetFoldouts);
        _ParameterPresetEditor.DisplayParameterList().DoLayoutList();

        EditorGUILayout.LabelField("Run the project to initialise the controls!");
    }