protected virtual void LastUpdateInspector() { #region Unity Events AC_EditorGUIUtility.ShurikenFoldoutHeader("Value Events", TextTitleStyle, ref m_ValueEventsFoldout); if (m_ValueEventsFoldout) { EditorGUILayout.PropertyField(OnInvalidValue, new GUIContent("On Invalid Value")); } AC_EditorGUIUtility.ShurikenFoldoutHeader("Time Events", TextTitleStyle, ref m_TimeEventsFoldout); if (m_TimeEventsFoldout) { EditorGUILayout.PropertyField(OnHour, new GUIContent("On Hour")); EditorGUILayout.PropertyField(OnMinute, new GUIContent("On Minute")); } AC_EditorGUIUtility.ShurikenFoldoutHeader("Date Events", TextTitleStyle, ref m_DateEventsFoldout); if (m_DateEventsFoldout) { EditorGUILayout.PropertyField(OnDay, new GUIContent("On Day")); EditorGUILayout.PropertyField(OnMonth, new GUIContent("On Month")); EditorGUILayout.PropertyField(OnYear, new GUIContent("On Year")); } #endregion }
/* * protected override void UpdateInspector() * { * * base.UpdateInspector(); * * }*/ protected override void LastUpdateInspector() { #region Location. AC_EditorGUIUtility.ShurikenFoldoutHeader("Location", TextTitleStyle, ref m_LocationFoldout); if (m_LocationFoldout) { AC_EditorGUIUtility.ShurikenHeader("Location", TextSectionStyle, 20); EditorGUILayout.Separator(); EditorGUILayout.PropertyField(m_Latitude, new GUIContent("Latitude")); EditorGUILayout.Separator(); EditorGUILayout.PropertyField(m_Longitude, new GUIContent("Longitude")); EditorGUILayout.Separator(); EditorGUILayout.PropertyField(m_UTC, new GUIContent("UTC")); EditorGUILayout.Separator(); } #endregion base.LastUpdateInspector(); }
void OnInspectorOtherSettings() { AC_EditorGUIUtility.ShurikenFoldoutHeader("Other Settings", TextTitleStyle, ref m_OtherSettingsFoldout); if (m_OtherSettingsFoldout) { AC_EditorGUIUtility.ShurikenHeader("Color Correction", TextSectionStyle, 20); EditorGUILayout.Separator(); //GUI.backgroundColor = m_HDR.boolValue ? green : red; EditorGUILayout.PropertyField(m_HDR, new GUIContent("HDR")); // GUI.backgroundColor = Color.white; AC_EditorGUIUtility.Separator(2); EditorGUILayout.Separator(); EditorGUILayout.PropertyField(m_Exposure, new GUIContent("Exposure")); AC_EditorGUIUtility.Separator(2); EditorGUILayout.Separator(); AC_EditorGUIUtility.ShurikenHeader("Eclipse", TextSectionStyle, 20); EditorGUILayout.Separator(); EditorGUILayout.PropertyField(m_SolarEclipseThreshold, new GUIContent("Solar Eclipse Threshold")); } }
protected void OnInspectorResoucresAndComponents() { AC_EditorGUIUtility.ShurikenFoldoutHeader("Resources And Components", TextTitleStyle, ref m_ResourcesAndComponentsFoldout); if (m_ResourcesAndComponentsFoldout) { // Resources. AC_EditorGUIUtility.ShurikenHeader("Resources", TextSectionStyle, 20); GUI.backgroundColor = (m_Resources.objectReferenceValue != null) ? green : red; EditorGUILayout.PropertyField(m_Resources, new GUIContent("Resources")); GUI.backgroundColor = Color.white; if (m_Resources.objectReferenceValue == null) { EditorGUILayout.HelpBox("Resources Data is not assigned", MessageType.Warning); } else { EditorGUILayout.HelpBox("Be sure to allocate all resources", MessageType.Info); } EditorGUILayout.Separator(); // Build. AC_EditorGUIUtility.ShurikenHeader("Build", TextSectionStyle, 20); EditorGUILayout.Separator(); GUI.backgroundColor = (m_Resources.objectReferenceValue != null) ? green : red; if (GUILayout.Button("Build Sky Sphere", GUILayout.Height(30))) { tar.BuildSkySphere(); } GUI.backgroundColor = Color.white; EditorGUILayout.Separator(); AC_EditorGUIUtility.ShurikenHeader("Camera", TextSectionStyle, 20); GUI.backgroundColor = (m_Camera.objectReferenceValue != null) ? green : red; EditorGUILayout.PropertyField(m_Camera, new GUIContent("Camera")); GUI.backgroundColor = Color.white; if (m_Camera.objectReferenceValue == null) { EditorGUILayout.HelpBox("Camera is not assigned", MessageType.Warning); } EditorGUILayout.Separator(); } }
public override void OnInspectorGUI() { serObj.Update(); GUI.color = Color.white; EditorGUILayout.Separator(); AC_EditorGUIUtility.ShurikenHeader("LSky", TextTitleStyle, 30); AC_EditorGUIUtility.ShurikenFoldoutHeader("Components And Resources", TextTitleStyle, CRFoldout); if (CRFoldout.boolValue) { ComponentsAndResources(); } AC_EditorGUIUtility.ShurikenFoldoutHeader("Atmosphere", TextTitleStyle, atmosphereFoldout); if (atmosphereFoldout.boolValue) { Atmosphere(); } AC_EditorGUIUtility.ShurikenFoldoutHeader("Celestials", TextTitleStyle, celestialsFoldout); if (celestialsFoldout.boolValue) { Celestials(); } AC_EditorGUIUtility.ShurikenFoldoutHeader("Color Correction", TextTitleStyle, colorCorrectionFoldout); if (colorCorrectionFoldout.boolValue) { ColorCorrection(); } AC_EditorGUIUtility.ShurikenFoldoutHeader("Lighting", TextTitleStyle, lightingFoldout); if (lightingFoldout.boolValue) { Lighting(); } serObj.ApplyModifiedProperties(); }
protected void OnInspectorCelestials() { AC_EditorGUIUtility.ShurikenFoldoutHeader("Celestials", TextTitleStyle, ref m_CelestialsFoldout); if (m_CelestialsFoldout) { // Background. AC_EditorGUIUtility.ShurikenHeader("Background", TextSectionStyle, 20); EditorGUILayout.Separator(); EditorGUILayout.PropertyField(m_BackgroundMeshQuality, new GUIContent("Background Mesh Quality")); AC_EditorGUIUtility.Separator(2); EditorGUILayout.Separator(); EditorGUILayout.PropertyField(m_BackgroundColor, new GUIContent("Background Color")); EditorGUILayout.PropertyField(m_BackgroundIntensity, new GUIContent("Background Intensity")); EditorGUILayout.BeginVertical(EditorStyles.helpBox); EditorGUILayout.PropertyField(m_BackgroundIntensityMultiplier, new GUIContent("Background Intensity Multiplier")); EditorGUILayout.HelpBox(EvaluateByFullSun, MessageType.Info); EditorGUILayout.EndVertical(); EditorGUILayout.Separator(); // Stars Field AC_EditorGUIUtility.ShurikenHeader("Stars Field", TextSectionStyle, 20); EditorGUILayout.Separator(); EditorGUILayout.PropertyField(m_StarsFieldMeshQuality, new GUIContent("Stars Field Mesh Quality")); AC_EditorGUIUtility.Separator(2); EditorGUILayout.PropertyField(m_StarsFieldColor, new GUIContent("Stars Field Color")); EditorGUILayout.PropertyField(m_StarsFieldIntensity, new GUIContent("Stars Field Intensity")); EditorGUILayout.BeginVertical(EditorStyles.helpBox); EditorGUILayout.PropertyField(m_StarsFieldIntensityMultiplier, new GUIContent("Stars Field Intensity Multiplier")); EditorGUILayout.HelpBox(EvaluateByFullSun, MessageType.Info); EditorGUILayout.EndVertical(); EditorGUILayout.PropertyField(m_StarsFieldScintillation, new GUIContent("Stars Field Scintillation")); EditorGUILayout.PropertyField(m_StarsFieldScintillationSpeed, new GUIContent("Stars Field Scintillation Speed")); AC_EditorGUIUtility.Separator(2); EditorGUILayout.Separator(); // Sun. AC_EditorGUIUtility.ShurikenHeader("Sun", TextSectionStyle, 20); EditorGUILayout.Separator(); EditorGUILayout.PropertyField(m_SunPI, new GUIContent("Sun PI")); EditorGUILayout.PropertyField(m_SunTheta, new GUIContent("Sun Theta")); AC_EditorGUIUtility.Separator(2); EditorGUILayout.Separator(); EditorGUILayout.PropertyField(m_SunSize, new GUIContent("SunSize")); EditorGUILayout.PropertyField(m_SunColor, new GUIContent("Sun Color")); EditorGUILayout.PropertyField(m_SunIntensity, new GUIContent("Sun Intensity")); EditorGUILayout.Separator(); // Moon. AC_EditorGUIUtility.ShurikenHeader("Moon", TextSectionStyle, 20); EditorGUILayout.Separator(); EditorGUILayout.PropertyField(m_MoonMeshQuality, new GUIContent("Moon Mesh Quality")); AC_EditorGUIUtility.Separator(2); EditorGUILayout.Separator(); EditorGUILayout.PropertyField(m_MoonPI, new GUIContent("Moon PI")); EditorGUILayout.PropertyField(m_MoonTheta, new GUIContent("Moon Theta")); AC_EditorGUIUtility.Separator(2); EditorGUILayout.Separator(); EditorGUILayout.PropertyField(m_MoonSize, new GUIContent("MoonSize")); EditorGUILayout.PropertyField(m_MoonColor, new GUIContent("Moon Color")); EditorGUILayout.PropertyField(m_MoonIntensity, new GUIContent("Moon Intensity")); EditorGUILayout.Separator(); } }
protected override void _OnInspectorGUI() { #region Time. AC_EditorGUIUtility.ShurikenFoldoutHeader("Time", TextTitleStyle, ref m_TimeFoldout); if (m_TimeFoldout) { AC_EditorGUIUtility.ShurikenHeader("Timeline", TextSectionStyle, 20); EditorGUILayout.Separator(); GUI.backgroundColor = m_ProgressTime.boolValue ? green : red; EditorGUILayout.PropertyField(m_ProgressTime, new GUIContent("ProgressTime")); EditorGUILayout.BeginVertical(EditorStyles.helpBox); EditorGUILayout.PropertyField(m_Timeline, new GUIContent("Timeline")); EditorGUILayout.EndVertical(); GUI.backgroundColor = Color.white; EditorGUILayout.Separator(); AC_EditorGUIUtility.ShurikenHeader("Time Length", TextSectionStyle, 20); EditorGUILayout.Separator(); if (!m_SyncWithSystem.boolValue) { GUI.backgroundColor = m_UseDayNightLength.boolValue ? green : red; EditorGUILayout.PropertyField(m_UseDayNightLength, new GUIContent("Use Day Night Length")); GUI.backgroundColor = Color.white; EditorGUILayout.BeginVertical(EditorStyles.helpBox); if (m_UseDayNightLength.boolValue) { if (!OverrideDayRange) { // Day Range. float min = m_DayRange.vector2Value.x; float max = m_DayRange.vector2Value.y; AC_EditorGUIUtility.ShurikenHeader("Day Range", TextSectionStyle, 20); EditorGUILayout.BeginHorizontal(); { EditorGUILayout.MinMaxSlider(ref min, ref max, 0, 24); m_DayRange.vector2Value = new Vector2(min, max); EditorGUILayout.PropertyField(m_DayRange, new GUIContent("")); } EditorGUILayout.EndHorizontal(); string startInfo = "Day Start: " + CSky_DateTimeHelper.TimeToString ( CSky_DateTimeHelper.GetTimelineHour(min), CSky_DateTimeHelper.GetTimelineMinute(min) ); string endInfo = "Day End: " + CSky_DateTimeHelper.TimeToString ( CSky_DateTimeHelper.GetTimelineHour(max), CSky_DateTimeHelper.GetTimelineMinute(max) ); EditorGUILayout.HelpBox(startInfo + " | " + endInfo, MessageType.Info); EditorGUILayout.Separator(); } AC_EditorGUIUtility.Separator(2); EditorGUILayout.PropertyField(m_DayLength, new GUIContent("Day In Minutes")); EditorGUILayout.PropertyField(m_NightLength, new GUIContent("Night In Minutes")); } else { EditorGUILayout.PropertyField(m_DayLength, new GUIContent("Day In Minutes")); } EditorGUILayout.Separator(); EditorGUILayout.EndVertical(); } EditorGUILayout.Separator(); AC_EditorGUIUtility.ShurikenHeader("Set Time", TextSectionStyle, 20); EditorGUILayout.BeginVertical(EditorStyles.helpBox); { EditorGUILayout.PropertyField(m_Hour, new GUIContent("Hour")); EditorGUILayout.PropertyField(m_Minute, new GUIContent("Minute")); EditorGUILayout.PropertyField(m_Second, new GUIContent("Second")); GUI.backgroundColor = green; if (GUILayout.Button("Set Time", GUILayout.MinHeight(30))) { tar.Hour = m_Hour.intValue; tar.Minute = m_Minute.intValue; tar.Second = m_Second.intValue; } GUI.backgroundColor = Color.white; } EditorGUILayout.EndVertical(); EditorGUILayout.Separator(); } #endregion #region Date AC_EditorGUIUtility.ShurikenFoldoutHeader("Date", TextTitleStyle, ref m_DateFoldout); if (m_DateFoldout) { EditorGUILayout.PropertyField(m_Day, new GUIContent("Day")); EditorGUILayout.PropertyField(m_Month, new GUIContent("Month")); EditorGUILayout.PropertyField(m_Year, new GUIContent("Year")); } #endregion AC_EditorGUIUtility.ShurikenFoldoutHeader("Options", TextTitleStyle, ref m_OptionsFoldout); if (m_OptionsFoldout) { GUI.backgroundColor = m_SyncWithSystem.boolValue ? Color.green : Color.red; EditorGUILayout.Separator(); EditorGUILayout.PropertyField(m_SyncWithSystem, new GUIContent("Synchronize With System DateTime")); EditorGUILayout.Separator(); GUI.backgroundColor = Color.white; } LastUpdateInspector(); }
protected void OnInspectorLighting() { AC_EditorGUIUtility.ShurikenFoldoutHeader("Lighting", TextTitleStyle, ref m_LightingFoldout); if (m_LightingFoldout) { #region |Celestials| // Sun. AC_EditorGUIUtility.ShurikenHeader("Sun Light", TextSectionStyle, 20); EditorGUILayout.Separator(); EditorGUILayout.PropertyField(m_SunLightColor, new GUIContent("Sun Light Color")); EditorGUILayout.PropertyField(m_SunLightIntensity, new GUIContent("Sun Light Intensity")); EditorGUILayout.BeginVertical(EditorStyles.helpBox); EditorGUILayout.PropertyField(m_SunLightIntensityMultiplier, new GUIContent("Sun Light Intensity Multiplier")); EditorGUILayout.HelpBox(EvaluateByAboveSun, MessageType.Info); EditorGUILayout.EndVertical(); EditorGUILayout.PropertyField(m_SunLightThreshold, new GUIContent("Sun Light Threshold")); EditorGUILayout.Separator(); // Moon. AC_EditorGUIUtility.ShurikenHeader("Moon Light", TextSectionStyle, 20); EditorGUILayout.Separator(); EditorGUILayout.PropertyField(m_MoonLightColor, new GUIContent("Moon Light Color")); EditorGUILayout.PropertyField(m_MoonLightIntensity, new GUIContent("Moon Light Intensity")); EditorGUILayout.BeginVertical(EditorStyles.helpBox); EditorGUILayout.PropertyField(m_MoonLightIntensityMultiplier, new GUIContent("Moon Light Intensity Multiplier")); EditorGUILayout.HelpBox(EvaluateByAboveMoon, MessageType.Info); EditorGUILayout.EndVertical(); //GUI.backgroundColor = m_DisableMoonLightInDay.boolValue ? green : red; EditorGUILayout.PropertyField(m_DisableMoonLightInDay, new GUIContent("Disable Moon Light In Day")); //GUI.backgroundColor = Color.white; if (m_DisableMoonLightInDay.boolValue) { EditorGUILayout.BeginVertical(EditorStyles.helpBox); EditorGUILayout.PropertyField(m_MoonLightIntensityCorrector, new GUIContent("Moon Light Intensity Corrector")); EditorGUILayout.HelpBox(EvaluateByFullSun, MessageType.Info); EditorGUILayout.EndVertical(); } EditorGUILayout.Separator(); #endregion #region Environment AC_EditorGUIUtility.ShurikenHeader("Environment", TextSectionStyle, 20); EditorGUILayout.Separator(); EditorGUILayout.PropertyField(m_EnviroUpdateInterval, new GUIContent("Update Interval")); EditorGUILayout.Separator(); // GUI.backgroundColor = m_SendSkybox.boolValue ? green : red; EditorGUILayout.PropertyField(m_SendSkybox, new GUIContent("Send Skybox")); // GUI.backgroundColor = Color.white; AC_EditorGUIUtility.Separator(2); EditorGUILayout.Separator(); EditorGUILayout.PropertyField(m_AmbientMode, new GUIContent("Ambient Mode")); AC_EditorGUIUtility.Separator(2); EditorGUILayout.Separator(); switch (m_AmbientMode.enumValueIndex) { case 0: EditorGUILayout.PropertyField(m_AmbientIntensity, new GUIContent("Ambient Intensity")); if (m_SendSkybox.boolValue) { EditorGUILayout.BeginVertical(EditorStyles.helpBox); EditorGUILayout.PropertyField(m_AmbientSunGroundColor, new GUIContent("Ambient Ground Color")); EditorGUILayout.HelpBox(EvaluateByFullSun, MessageType.Info); EditorGUILayout.EndVertical(); EditorGUILayout.BeginVertical(EditorStyles.helpBox); if (m_MoonRayleigh.boolValue) { EditorGUILayout.PropertyField(m_AmbientMoonGroundColor, new GUIContent("Ambient Moon Ground Color")); EditorGUILayout.HelpBox(EvaluateByFullMoon + " | " + "Moon influence mode = add", MessageType.Info); } EditorGUILayout.EndVertical(); } break; case 1: EditorGUILayout.BeginVertical(EditorStyles.helpBox); EditorGUILayout.PropertyField(m_AmbientSunSkyColor, new GUIContent("Ambient Sun Sky Color")); EditorGUILayout.PropertyField(m_AmbientSunEquatorColor, new GUIContent("Ambient Sun Equator Color")); EditorGUILayout.PropertyField(m_AmbientSunGroundColor, new GUIContent("Ambient Sun Ground Color")); EditorGUILayout.HelpBox(EvaluateByFullSun, MessageType.Info); EditorGUILayout.EndVertical(); AC_EditorGUIUtility.Separator(2); EditorGUILayout.Separator(); if (m_MoonRayleigh.boolValue) { EditorGUILayout.BeginVertical(EditorStyles.helpBox); EditorGUILayout.PropertyField(m_AmbientMoonSkyColor, new GUIContent("Ambient Moon Sky Color")); EditorGUILayout.PropertyField(m_AmbientMoonEquatorColor, new GUIContent("Ambient Moon Equator Color")); EditorGUILayout.PropertyField(m_AmbientMoonGroundColor, new GUIContent("Ambient Moon Ground Color")); EditorGUILayout.HelpBox(EvaluateByFullMoon + "|" + "Moon influence mode = add", MessageType.Info); EditorGUILayout.EndVertical(); } break; case 2: { EditorGUILayout.BeginVertical(EditorStyles.helpBox); EditorGUILayout.PropertyField(m_AmbientSunSkyColor, new GUIContent("Ambient Sun Sky Color")); if (m_SendSkybox.boolValue) { EditorGUILayout.PropertyField(m_AmbientSunGroundColor, new GUIContent("Ambient Sun Ground Color")); } EditorGUILayout.HelpBox(EvaluateByFullSun, MessageType.Info); EditorGUILayout.EndVertical(); AC_EditorGUIUtility.Separator(2); EditorGUILayout.Separator(); EditorGUILayout.BeginVertical(EditorStyles.helpBox); if (m_MoonRayleigh.boolValue) { EditorGUILayout.PropertyField(m_AmbientMoonSkyColor, new GUIContent("Ambient Moon Sky Color")); if (m_SendSkybox.boolValue) { EditorGUILayout.PropertyField(m_AmbientMoonGroundColor, new GUIContent("Ambient Moon Ground Color")); } EditorGUILayout.HelpBox(EvaluateByFullMoon + " | " + "Moon influence mode = add", MessageType.Info); } EditorGUILayout.EndVertical(); } break; } #endregion #region |Unity Fog| AC_EditorGUIUtility.ShurikenHeader("Unity Fog", TextSectionStyle, 20); EditorGUILayout.Separator(); //GUI.backgroundColor = m_EnableUnityFog.boolValue ? green : red; EditorGUILayout.PropertyField(m_EnableUnityFog, new GUIContent("Enable Unity Fog")); //GUI.backgroundColor = Color.white; if (m_EnableUnityFog.boolValue) { EditorGUILayout.PropertyField(m_UnityFogMode, new GUIContent("Unity Fog Mode")); AC_EditorGUIUtility.Separator(2); EditorGUILayout.Separator(); EditorGUILayout.BeginVertical(EditorStyles.helpBox); EditorGUILayout.PropertyField(m_UnitySunFogColor, new GUIContent("Unity Sun Fog Color")); EditorGUILayout.HelpBox(EvaluateByFullSun, MessageType.Info); EditorGUILayout.EndVertical(); EditorGUILayout.BeginVertical(EditorStyles.helpBox); if (m_MoonRayleigh.boolValue) { EditorGUILayout.PropertyField(m_UnityMoonFogColor, new GUIContent("Unity Moon Fog Color")); EditorGUILayout.HelpBox(EvaluateByFullMoon, MessageType.Info); } EditorGUILayout.EndVertical(); AC_EditorGUIUtility.Separator(2); EditorGUILayout.Separator(); if (m_UnityFogMode.enumValueIndex != 0) { EditorGUILayout.PropertyField(m_UnityFogDensity, new GUIContent("Unity Fog Density")); } else { EditorGUILayout.PropertyField(m_UnityFogStartDistance, new GUIContent("Unity Fog Start Distance")); EditorGUILayout.PropertyField(m_UnityFogEndDistance, new GUIContent("Unity Fog End Distance")); } } EditorGUILayout.Separator(); #endregion } }
protected void OnInspectorAtmosphere() { AC_EditorGUIUtility.ShurikenFoldoutHeader("Atmosphere", TextTitleStyle, ref m_AtmosphereFoldout); if (m_AtmosphereFoldout) { // Settings. AC_EditorGUIUtility.ShurikenHeader("Atmosphere Settings", TextSectionStyle, 20); EditorGUILayout.Separator(); EditorGUILayout.PropertyField(m_AtmosphereMeshQuality, new GUIContent("Atmosphere Mesh Quality")); GUI.backgroundColor = m_AtmosphereQuality.enumValueIndex == 1 ? Color.yellow : green; EditorGUILayout.PropertyField(m_AtmosphereQuality, new GUIContent("Atmosphere Quality")); GUI.backgroundColor = Color.white; EditorGUILayout.PropertyField(m_AtmosphereShader, new GUIContent("Atmosphere Shader")); EditorGUILayout.Separator(); // Wavelengths. AC_EditorGUIUtility.ShurikenHeader("Rayleigh", TextSectionStyle, 20); EditorGUILayout.Separator(); GUI.backgroundColor = Color.red; EditorGUILayout.PropertyField(m_WavelengthR, new GUIContent("Wavelength R")); GUI.backgroundColor = Color.green; EditorGUILayout.PropertyField(m_WavelengthG, new GUIContent("Wavelength G")); GUI.backgroundColor = Color.blue; EditorGUILayout.PropertyField(m_WavelengthB, new GUIContent("Wavelength B")); GUI.backgroundColor = Color.white; EditorGUILayout.Separator(); EditorGUILayout.PropertyField(m_AtmosphereThickness, new GUIContent("Atmosphere Thickness")); EditorGUILayout.Separator(); EditorGUILayout.PropertyField(m_SunBrightness, new GUIContent("Sun Brightness")); AC_EditorGUIUtility.Separator(2); EditorGUILayout.Separator(); EditorGUILayout.PropertyField(m_SunAtmosphereTint, new GUIContent(m_MoonRayleigh.boolValue ? "Sun Atmosphere Tint" : "Day Atmosphere Tint")); AC_EditorGUIUtility.Separator(2); EditorGUILayout.Separator(); if (m_AtmosphereShader.enumValueIndex == 1) { EditorGUILayout.PropertyField(m_SunIntensityFactor, new GUIContent(m_MoonRayleigh.boolValue ? "Sun Intensity Factor" : "Day Intensity Factor")); AC_EditorGUIUtility.Separator(2); EditorGUILayout.Separator(); } //GUI.backgroundColor = m_EnableMoonInfluence.boolValue ? green : red; EditorGUILayout.PropertyField(m_MoonRayleigh, new GUIContent("Moon Rayleigh")); EditorGUILayout.Separator(); EditorGUILayout.PropertyField(m_MoonBrightness, new GUIContent("Moon Brightness")); EditorGUILayout.PropertyField(m_MoonAtmosphereTint, new GUIContent(m_MoonRayleigh.boolValue ? "Moon Atmosphere Tint" : "Night Atmosphere Tint")); AC_EditorGUIUtility.Separator(2); EditorGUILayout.Separator(); if (m_AtmosphereShader.enumValueIndex == 1) { EditorGUILayout.PropertyField(m_MoonIntensityFactor, new GUIContent("Night Intensity Factor")); AC_EditorGUIUtility.Separator(2); EditorGUILayout.Separator(); } EditorGUILayout.Separator(); // Mie. AC_EditorGUIUtility.ShurikenHeader("Mie", TextSectionStyle, 20); EditorGUILayout.Separator(); EditorGUILayout.PropertyField(m_Mie, new GUIContent("Mie")); if (m_AtmosphereShader.intValue == 1) { EditorGUILayout.PropertyField(m_Turbidity, new GUIContent("Turbidity")); AC_EditorGUIUtility.Separator(2); EditorGUILayout.Separator(); } EditorGUILayout.PropertyField(m_SunMieColor, new GUIContent("Sun Mie Color")); EditorGUILayout.PropertyField(m_SunMieAnisotropy, new GUIContent("Sun Mie Anisotropy")); EditorGUILayout.PropertyField(m_SunMieScattering, new GUIContent("Sun Mie Scattering")); AC_EditorGUIUtility.Separator(2); EditorGUILayout.Separator(); EditorGUILayout.PropertyField(m_MoonMieColor, new GUIContent("Moon Mie Color")); EditorGUILayout.PropertyField(m_MoonMieAnisotropy, new GUIContent("Moon Mie Anisotropy")); EditorGUILayout.PropertyField(m_MoonMieScattering, new GUIContent("Moon Mie Scattering")); EditorGUILayout.Separator(); // Atmosphere Other. AC_EditorGUIUtility.ShurikenHeader("Other", TextSectionStyle, 20); EditorGUILayout.Separator(); EditorGUILayout.PropertyField(m_AtmosphereExponent, new GUIContent("Atmosphere Exponent")); AC_EditorGUIUtility.Separator(2); EditorGUILayout.Separator(); EditorGUILayout.PropertyField(m_HorizonOffset, new GUIContent("Horizon Offset")); AC_EditorGUIUtility.Separator(2); EditorGUILayout.Separator(); if (m_AtmosphereShader.intValue == 1) { EditorGUILayout.PropertyField(m_RayleighZenithLength, new GUIContent("Rayleigh Zenith Length")); EditorGUILayout.PropertyField(m_MieZenithLength, new GUIContent("Mie Zenith Length")); } else { EditorGUILayout.PropertyField(m_CameraHeight, new GUIContent("Camera Height")); } // AC_EditorGUIUtility.Separator(2); //EditorGUILayout.Separator(); EditorGUILayout.Separator(); } }