public override void OnInspectorGUI(Terrain terrain, IOnInspectorGUI editContext) { if (m_HardnessNoiseSettings == null) { m_HardnessNoiseSettings = ScriptableObject.CreateInstance <NoiseSettings>(); m_HardnessNoiseSettings.Reset(); } Erosion.HydraulicErosionSettings erosionSettings = ((Erosion.HydraulicEroder)m_Eroder).m_ErosionSettings; EditorGUI.BeginChangeCheck(); commonUI.OnInspectorGUI(terrain, editContext); m_Eroder.OnInspectorGUI(terrain, editContext); commonUI.validationMessage = ValidateAndGenerateUserMessage(terrain); if (EditorGUI.EndChangeCheck()) { Save(true); } }
private void ResetRevertCallback() { Undo.RecordObject(m_noiseUpdateTarget, "NoiseWindow - Reset or Revert Settings"); if (m_noiseSourceAsset == null) { m_noiseUpdateTarget.Reset(); } else { m_noiseUpdateTarget.Copy(m_noiseSourceAsset); } }
public void OnInspectorGUI(Terrain terrain, IOnInspectorGUI editContext) { if (m_noiseSettings == null) { m_noiseSettings = ScriptableObject.CreateInstance <NoiseSettings>(); m_noiseSettings.Reset(); } if (m_noiseSettingsGUI == null) { m_noiseSettingsGUI = new NoiseSettingsGUI(); m_noiseSettingsGUI.Init(m_noiseSettings); } m_noiseSettingsGUI.OnGUI(NoiseSettingsGUIFlags.Settings); }