/*
         * protected override void UpdateInspector()
         * {
         *
         *  base.UpdateInspector();
         *
         * }*/


        protected override void LastUpdateInspector()
        {
            #region Location.

            R_EditorGUIUtility.ShurikenFoldoutHeader("Location", TextTitleStyle, ref m_LocationFoldout);

            if (m_LocationFoldout)
            {
                R_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();
        }
Beispiel #2
0
        protected void GeneralSettings()
        {
            R_EditorGUIUtility.ShurikenFoldoutHeader("General Settings", TextTitleStyle, ref m_GeneralSettingsFoldout);
            if (m_GeneralSettingsFoldout)
            {
                // Color Correction
                // =================

                R_EditorGUIUtility.ShurikenHeader("Color Correction", TextSectionStyle, 20);
                EditorGUILayout.Separator();

                EditorGUILayout.PropertyField(m_DomeRadius, new GUIContent("Dome Radius"));
                R_EditorGUIUtility.Separator(2);
                EditorGUILayout.Separator();

                //GUI.backgroundColor = m_HDR.boolValue ? green : red;
                EditorGUILayout.PropertyField(m_ApplyFastTonemaping, new GUIContent("Apply Fast Tonemaping"));
                // GUI.backgroundColor = Color.white;
                R_EditorGUIUtility.Separator(2);
                EditorGUILayout.Separator();

                EditorGUILayout.PropertyField(m_Exposure, new GUIContent("Exposure"));
                //EditorGUILayout.HelpBox("Evaluate Curve time by full sun cycle", MessageType.Info);
                R_EditorGUIUtility.Separator(2);
                EditorGUILayout.Separator();
                //===========================================================================================================
            }
        }
        protected virtual void Clouds()
        {
            R_EditorGUIUtility.ShurikenFoldoutHeader("Clouds", TextTitleStyle, ref m_CloudsFoldout);
            if (m_CloudsFoldout)
            {
                R_EditorGUIUtility.ShurikenHeader("Clouds", TextSectionStyle, 20);
                EditorGUILayout.Separator();

                EditorGUILayout.PropertyField(m_RenderClouds, new GUIContent("Render Clouds"));
                R_EditorGUIUtility.Separator(2);

                EditorGUILayout.PropertyField(m_CloudsLayerIndex, new GUIContent("Clouds Layer Index"));
                R_EditorGUIUtility.Separator(2);

                EditorGUILayout.PropertyField(m_CloudsMeshHeightSize, new GUIContent("Clouds Mesh Height Size"));
                R_EditorGUIUtility.Separator(2);

                EditorGUILayout.PropertyField(m_CloudsRotationSpeed, new GUIContent("Clouds Rotation Speed"));
                R_EditorGUIUtility.Separator(2);


                m_CloudsTexture.objectReferenceValue = (Texture2D)EditorGUILayout.ObjectField("Clouds Texture", m_CloudsTexture.objectReferenceValue, typeof(Texture2D), true);
                R_EditorGUIUtility.Separator(2);

                EditorGUILayout.PropertyField(m_CloudsSize, new GUIContent("Clouds Size"));
                EditorGUILayout.PropertyField(m_CloudsTexOffset, new GUIContent("Clouds Tex Offset"));
                R_EditorGUIUtility.Separator(2);

                EditorGUILayout.BeginVertical("Box");
                EditorGUILayout.PropertyField(m_CloudsColor, new GUIContent("Clouds Color"));
                EditorGUILayout.HelpBox("Evaluate Gradient time by full sun cicle", MessageType.Info);
                EditorGUILayout.EndVertical();

                if (m_NightAtmosphereMode.intValue == 1)
                {
                    EditorGUILayout.BeginVertical("Box");
                    EditorGUILayout.PropertyField(m_CloudsMoonColor, new GUIContent("Clouds Moon Color"));
                    EditorGUILayout.HelpBox("Evaluate Gradient time by full moon cicle", MessageType.Info);
                    EditorGUILayout.EndVertical();
                }

                EditorGUILayout.PropertyField(m_CloudsIntensity, new GUIContent("Clouds Intensity"));
                R_EditorGUIUtility.Separator(2);


                EditorGUILayout.PropertyField(m_CloudsDensity, new GUIContent("Clouds Density"));
                R_EditorGUIUtility.Separator(2);

                EditorGUILayout.PropertyField(m_CloudsCoverage, new GUIContent("Clouds Coverage"));
                R_EditorGUIUtility.Separator(2);

                EditorGUILayout.Separator();


                EditorGUILayout.Separator();
                //=============================================================================================================================================
            }
        }
        //======================================================================================


        // On Inspector GUI
        //--------------------------------------------------------------------------------------
        public override void OnInspectorGUI()
        {
            serObj.Update();

            R_EditorGUIUtility.ShurikenHeader(Title, TextTitleStyle, 30);

            _OnInspectorGUI();

            serObj.ApplyModifiedProperties();
        }
        protected virtual void Resources()
        {
            R_EditorGUIUtility.ShurikenFoldoutHeader("Resources", TextTitleStyle, ref m_RCFoldout);
            if (m_RCFoldout)
            {
                // Resources
                //---------------------------------------------------------------------------------------------
                R_EditorGUIUtility.ShurikenHeader("Resources", TextSectionStyle, 20);
                EditorGUILayout.Separator();

                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();
                //=============================================================================================

                /*
                 * // Components
                 * //---------------------------------------------------------------------------------------------
                 *
                 * R_EditorGUIUtility.ShurikenHeader("Components", TextSectionStyle, 20);
                 * EditorGUILayout.Separator();
                 *
                 * 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();*/
                //=============================================================================================
            }
        }
Beispiel #6
0
        protected virtual void Celestials()
        {
            #region |Deep Space|

            R_EditorGUIUtility.ShurikenFoldoutHeader("Deep Space", TextTitleStyle, ref m_DeepSpaceFoldout);
            if (m_DeepSpaceFoldout)
            {
                R_EditorGUIUtility.ShurikenHeader("Galaxy Background", TextSectionStyle, 20);
                EditorGUILayout.Separator();


                EditorGUILayout.PropertyField(m_RenderGalaxy, new GUIContent("Render Galaxy"));

                if (m_RenderGalaxy.boolValue)
                {
                    R_EditorGUIUtility.Separator(2);
                    EditorGUILayout.Separator();

                    EditorGUILayout.PropertyField(m_GalaxyLayerIndex, new GUIContent("Galaxy Layer Index"));
                    R_EditorGUIUtility.Separator(2);
                    EditorGUILayout.Separator();

                    m_GalaxyCubemap.objectReferenceValue = (Cubemap)EditorGUILayout.ObjectField("Galaxy Cubemap", m_GalaxyCubemap.objectReferenceValue, typeof(Cubemap), true);
                    EditorGUILayout.Separator();

                    EditorGUILayout.PropertyField(m_GalaxyColor, new GUIContent("Galaxy Color"));

                    EditorGUILayout.BeginVertical("Box");
                    EditorGUILayout.PropertyField(m_GalaxyIntensity, new GUIContent("Galaxy Intensity"));
                    EditorGUILayout.HelpBox("Evaluate Curve time by full sun cycle", MessageType.Info);
                    EditorGUILayout.EndVertical();

                    EditorGUILayout.PropertyField(m_GalaxyExponentFade, new GUIContent("Galaxy Exponent Fade"));
                    R_EditorGUIUtility.Separator(2);
                }
                EditorGUILayout.Separator();



                R_EditorGUIUtility.ShurikenHeader("Stars Field", TextSectionStyle, 20);
                EditorGUILayout.Separator();

                EditorGUILayout.PropertyField(m_RenderStarsField, new GUIContent("Stars Field"));

                if (m_RenderStarsField.boolValue)
                {
                    R_EditorGUIUtility.Separator(2);
                    EditorGUILayout.Separator();

                    EditorGUILayout.PropertyField(m_StarsFieldeLayerIndex, new GUIContent("Stars Field Layer Index"));
                    R_EditorGUIUtility.Separator(2);
                    EditorGUILayout.Separator();

                    m_StarsFieldCubemap.objectReferenceValue      = (Cubemap)EditorGUILayout.ObjectField("Stars Field Cubemap", m_StarsFieldCubemap.objectReferenceValue, typeof(Cubemap), true);
                    m_StarsFieldNoiseCubemap.objectReferenceValue = (Cubemap)EditorGUILayout.ObjectField("Stars Field Noise Cubemap (R)", m_StarsFieldNoiseCubemap.objectReferenceValue, typeof(Cubemap), true);
                    R_EditorGUIUtility.Separator(2);
                    EditorGUILayout.Separator();

                    EditorGUILayout.PropertyField(m_StarsFieldColor, new GUIContent("Stars Field Color"));

                    EditorGUILayout.BeginVertical("Box");
                    EditorGUILayout.PropertyField(m_StarsFieldIntensity, new GUIContent("Stars Field Intensity"));
                    EditorGUILayout.HelpBox("Evaluate Curve time by full sun cycle", MessageType.Info);
                    EditorGUILayout.EndVertical();

                    R_EditorGUIUtility.Separator(2);
                    EditorGUILayout.Separator();

                    EditorGUILayout.PropertyField(m_StarsFieldScintillation, new GUIContent("Stars Field Scintillation"));
                    EditorGUILayout.PropertyField(m_StarsFieldScintillationSpeed, new GUIContent("Stars Field Scintillation Speed"));
                    R_EditorGUIUtility.Separator(2);
                }

                EditorGUILayout.Separator();
                //========================================
            }

            #endregion


            #region |Near Space|

            R_EditorGUIUtility.ShurikenFoldoutHeader("Near Space", TextTitleStyle, ref m_NearSpaceFoldout);
            if (m_NearSpaceFoldout)
            {
                R_EditorGUIUtility.ShurikenHeader("General Settings", TextSectionStyle, 20);
                EditorGUILayout.Separator();

                EditorGUILayout.PropertyField(m_RenderNearSpace, new GUIContent("Render Near Space"));

                R_EditorGUIUtility.Separator(2);
                EditorGUILayout.Separator();

                EditorGUILayout.PropertyField(m_NearSpaceLayerIndex, new GUIContent("Near Space Layer Index"));
                R_EditorGUIUtility.Separator(2);

                R_EditorGUIUtility.ShurikenHeader("Sun", TextSectionStyle, 20);

                EditorGUILayout.PropertyField(m_SunPI, new GUIContent("Sun PI"));
                EditorGUILayout.Separator();

                EditorGUILayout.PropertyField(m_SunTheta, new GUIContent("Sun Theta"));
                R_EditorGUIUtility.Separator(2);
                EditorGUILayout.Separator();

                if (m_RenderNearSpace.boolValue)
                {
                    EditorGUILayout.PropertyField(m_RenderSun, new GUIContent("Render Sun"));
                    if (m_RenderSun.boolValue)
                    {
                        EditorGUILayout.Separator();
                        EditorGUILayout.BeginVertical("Box");
                        EditorGUILayout.PropertyField(m_SunSize, new GUIContent("Sun Size"));
                        EditorGUILayout.HelpBox("Evaluate Curve time by sun above horizon", MessageType.Info);
                        EditorGUILayout.EndVertical();
                        EditorGUILayout.Separator();

                        EditorGUILayout.BeginVertical("Box");
                        EditorGUILayout.PropertyField(m_SunColor, new GUIContent("Sun Color"));
                        EditorGUILayout.HelpBox("Evaluate Gradient time by sun above horizon", MessageType.Info);
                        EditorGUILayout.EndVertical();

                        EditorGUILayout.PropertyField(m_SunIntensity, new GUIContent("Sun Intensity"));
                        EditorGUILayout.Separator();
                    }
                }

                R_EditorGUIUtility.ShurikenHeader("Moon", TextSectionStyle, 20);

                EditorGUILayout.PropertyField(m_MoonPI, new GUIContent("Moon PI"));
                EditorGUILayout.Separator();

                EditorGUILayout.PropertyField(m_MoonTheta, new GUIContent("Moon Theta"));
                R_EditorGUIUtility.Separator(2);
                EditorGUILayout.Separator();

                if (m_RenderNearSpace.boolValue)
                {
                    EditorGUILayout.PropertyField(m_RenderMoon, new GUIContent("Render Moon"));
                    if (m_RenderMoon.boolValue)
                    {
                        R_EditorGUIUtility.Separator(2);
                        EditorGUILayout.BeginVertical("Box");
                        m_MoonRenderTexture.objectReferenceValue = (RenderTexture)EditorGUILayout.ObjectField("Moon Render Texture", m_MoonRenderTexture.objectReferenceValue, typeof(RenderTexture), true);

                        R_EditorGUIUtility.Separator(2);
                        EditorGUILayout.PropertyField(m_MoonRenderLayerIndex, new GUIContent("Moon Render Layer Index"));
                        R_EditorGUIUtility.Separator(2);
                        EditorGUILayout.EndVertical();
                        R_EditorGUIUtility.Separator(2);
                        EditorGUILayout.Separator();

                        m_MoonTexture.objectReferenceValue = (Texture2D)EditorGUILayout.ObjectField("Moon Texture(Map)", m_MoonTexture.objectReferenceValue, typeof(Texture2D), true);
                        EditorGUILayout.Separator();

                        EditorGUILayout.PropertyField(m_MoonTextureOffset, new GUIContent("Moon Texture Offset"));
                        EditorGUILayout.Separator();

                        EditorGUILayout.Separator();
                        EditorGUILayout.BeginVertical("Box");
                        EditorGUILayout.PropertyField(m_MoonSize, new GUIContent("Moon Size"));
                        EditorGUILayout.HelpBox("Evaluate curve time by sun above horizon", MessageType.Info);
                        EditorGUILayout.EndVertical();
                        EditorGUILayout.Separator();

                        EditorGUILayout.BeginVertical("Box");
                        EditorGUILayout.PropertyField(m_MoonColor, new GUIContent("Moon Color"));
                        EditorGUILayout.HelpBox("Evaluate gradient time by moon above horizon", MessageType.Info);
                        EditorGUILayout.EndVertical();

                        EditorGUILayout.PropertyField(m_MoonIntensity, new GUIContent("Moon Intensity"));
                        EditorGUILayout.PropertyField(m_MoonExponentFade, new GUIContent("Moon Exponent Fade"));
                        EditorGUILayout.Separator();
                    }
                    EditorGUILayout.Separator();
                }
            }

            #endregion
        }
Beispiel #7
0
        protected virtual void Atmosphere()
        {
            R_EditorGUIUtility.ShurikenFoldoutHeader("Atmosphere", TextTitleStyle, ref m_AtmosphereFoldout);
            if (m_AtmosphereFoldout)
            {
                R_EditorGUIUtility.ShurikenHeader("Render", TextSectionStyle, 20);
                EditorGUILayout.Separator();

                EditorGUILayout.PropertyField(m_RenderAtmosphere, new GUIContent("Render Atmosphere"));
                R_EditorGUIUtility.Separator(2);

                EditorGUILayout.PropertyField(m_AtmosphereLayerIndex, new GUIContent("Atmosphere Layer Index"));
                R_EditorGUIUtility.Separator(2);

                EditorGUILayout.PropertyField(m_AtmosphereModel, new GUIContent("Atmosphere Model"));
                R_EditorGUIUtility.Separator(2);

                EditorGUILayout.Separator();


                // Quality
                //----------------------------------------------------------------------------------------------------------

                R_EditorGUIUtility.ShurikenHeader("Quality Settings", TextSectionStyle, 20);
                EditorGUILayout.Separator();

                EditorGUILayout.PropertyField(m_AtmosphereMeshQuality, new GUIContent("Atmosphere Mesh Quality"));
                R_EditorGUIUtility.Separator(2);

                EditorGUILayout.PropertyField(m_AtmosphereShaderQuality, new GUIContent("Atmosphere Shader Quality"));
                R_EditorGUIUtility.Separator(2);


                if (m_AtmosphereModel.intValue == 0)
                {
                    EditorGUILayout.PropertyField(m_RealtimeBetaRay, new GUIContent("Realtime BetaRay"));
                    EditorGUILayout.PropertyField(m_RealtimeBetaMie, new GUIContent("Realtime BetaMie"));
                    R_EditorGUIUtility.Separator(2);
                }
                else
                {
                    EditorGUILayout.PropertyField(m_AtmosphereSamples, new GUIContent("Atmosphere Samples"));
                    R_EditorGUIUtility.Separator(2);
                }

                EditorGUILayout.Separator();


                // Rayleigh
                //------------------------------------------------------------------------------------------------------

                R_EditorGUIUtility.ShurikenHeader("Rayleigh", TextSectionStyle, 20);
                EditorGUILayout.Separator();


                EditorGUILayout.PropertyField(m_WavelengthR, new GUIContent("WavelengthR"));
                EditorGUILayout.PropertyField(m_WavelengthG, new GUIContent("WavelengthG"));
                EditorGUILayout.PropertyField(m_WavelengthB, new GUIContent("WavelengthB"));
                R_EditorGUIUtility.Separator(2);

                if (m_AtmosphereModel.intValue == 0 && !m_RealtimeBetaRay.boolValue)
                {
                    if (GUILayout.Button("Compute Beta Ray", GUILayout.Height(25)))
                    {
                        m_Target.GetBetaRay();
                    }
                }

                R_EditorGUIUtility.Separator(2);

                EditorGUILayout.BeginVertical("Box");
                EditorGUILayout.PropertyField(m_RayleighScattering, new GUIContent("Rayleigh Scattering"));
                EditorGUILayout.HelpBox("Evaluate time by full sun cycle", MessageType.Info);
                EditorGUILayout.EndVertical();

                if (m_AtmosphereModel.intValue == 0)
                {
                    EditorGUILayout.PropertyField(m_AtmosphereHaziness, new GUIContent("Atmosphere Haziness"));
                    EditorGUILayout.PropertyField(m_AtmosphereZenith, new GUIContent("Atmosphere Zenith"));
                }

                R_EditorGUIUtility.Separator(2);


                EditorGUILayout.BeginVertical("Box");
                EditorGUILayout.PropertyField(m_SunBrightness, new GUIContent("Sun Brightness"));
                EditorGUILayout.HelpBox("Evaluate time by full sun cycle", MessageType.Info);
                EditorGUILayout.EndVertical();

                EditorGUILayout.BeginVertical("Box");
                EditorGUILayout.PropertyField(m_DayAtmosphereTint, new GUIContent("Day Atmosphere Tint"));
                EditorGUILayout.HelpBox("Evaluate gradient by full sun cycle", MessageType.Info);
                EditorGUILayout.EndVertical();

                R_EditorGUIUtility.Separator(2);

                EditorGUILayout.PropertyField(m_NightAtmosphereMode, new GUIContent("Night Rayleigh Mode"));
                R_EditorGUIUtility.Separator(2);

                EditorGUILayout.PropertyField(m_MoonBrightness, new GUIContent("Moon Brightness"));
                EditorGUILayout.PropertyField(m_NightAtmosphereTint, new GUIContent("Night Atmosphere Tint"));
                //EditorGUILayout.HelpBox("Evaluate Gradient time by moon above horizon cycle", MessageType.Info);
                R_EditorGUIUtility.Separator(2);


                // Mie
                //-----------------------------------------------------------------------------------------------------------
                R_EditorGUIUtility.ShurikenHeader("Mie", TextSectionStyle, 20);
                EditorGUILayout.Separator();


                EditorGUILayout.PropertyField(m_Mie, new GUIContent(m_AtmosphereModel.intValue == 0 ? "Turbidity" : "Mie"));
                R_EditorGUIUtility.Separator(2);

                if (m_AtmosphereModel.intValue == 0 && !m_RealtimeBetaMie.boolValue)
                {
                    if (GUILayout.Button("Compute Beta Mie", GUILayout.Height(25)))
                    {
                        m_Target.GetBetaMie();
                    }
                }
                R_EditorGUIUtility.Separator(2);


                EditorGUILayout.BeginVertical("Box");
                EditorGUILayout.PropertyField(m_SunMieColor, new GUIContent("Sun Mie Color"));
                EditorGUILayout.HelpBox("Evaluate Gradient time by sun above horizon", MessageType.Info);
                EditorGUILayout.EndVertical();

                EditorGUILayout.PropertyField(m_SunMieAnisotropy, new GUIContent("Sun Mie Anisotropy"));

                EditorGUILayout.BeginVertical("Box");
                EditorGUILayout.PropertyField(m_SunMieScattering, new GUIContent("Sun Mie Scattering"));
                EditorGUILayout.HelpBox("Evaluate Curve time by full sun cycle", MessageType.Info);
                EditorGUILayout.EndVertical();
                R_EditorGUIUtility.Separator(2);

                EditorGUILayout.BeginVertical("Box");
                EditorGUILayout.PropertyField(m_MoonMieColor, new GUIContent("Moon Mie Color"));
                EditorGUILayout.HelpBox("Evaluate Gradient time by moon above horizon", MessageType.Info);
                EditorGUILayout.EndVertical();

                EditorGUILayout.PropertyField(m_MoonMieAnisotropy, new GUIContent("Moon Mie Anisotropy"));

                EditorGUILayout.BeginVertical("Box");
                EditorGUILayout.PropertyField(m_MoonMieScattering, new GUIContent("Moon Mie Scattering"));
                EditorGUILayout.HelpBox("Evaluate Curve time by full moon cycle", MessageType.Info);
                EditorGUILayout.EndVertical();
                R_EditorGUIUtility.Separator(2);

                EditorGUILayout.Separator();


                // Other settings.
                //-----------------------------------------------------------------------------------------------------------
                R_EditorGUIUtility.ShurikenHeader("Other Settings", TextSectionStyle, 20);
                EditorGUILayout.Separator();

                EditorGUILayout.PropertyField(m_AtmosphereExponentFade, new GUIContent("Atmosphere Exponent Fade"));
                R_EditorGUIUtility.Separator(2);

                EditorGUILayout.Separator();
            }
        }
        protected virtual void Lighting()
        {
            R_EditorGUIUtility.ShurikenFoldoutHeader("Lighitng", TextTitleStyle, ref m_LightingFoldout);
            if (m_LightingFoldout)
            {
                R_EditorGUIUtility.ShurikenHeader("Direction Light", TextSectionStyle, 20);
                EditorGUILayout.Separator();

                EditorGUILayout.BeginVertical("Box");
                EditorGUILayout.PropertyField(m_SunLightIntensity, new GUIContent("Sun Light Intensity"));
                EditorGUILayout.HelpBox("Evaluate Curve time by full sun cycle", MessageType.Info);
                EditorGUILayout.EndVertical();

                EditorGUILayout.BeginVertical("Box");
                EditorGUILayout.PropertyField(m_SunLightColor, new GUIContent("Sun Light Color"));
                EditorGUILayout.HelpBox("Evaluate Gradient time by full sun cycle", MessageType.Info);
                EditorGUILayout.EndVertical();

                R_EditorGUIUtility.Separator(2);

                EditorGUILayout.BeginVertical("Box");
                EditorGUILayout.PropertyField(m_MoonLightIntensity, new GUIContent("Moon Light Intensity"));
                EditorGUILayout.HelpBox("Evaluate Curve time by full moon cycle", MessageType.Info);
                EditorGUILayout.EndVertical();


                EditorGUILayout.BeginVertical("Box");
                EditorGUILayout.PropertyField(m_MoonLightColor, new GUIContent("Moon Light Color"));
                EditorGUILayout.HelpBox("Evaluate Curve time by full moon cycle", MessageType.Info);
                EditorGUILayout.EndVertical();
                R_EditorGUIUtility.Separator(2);

                EditorGUILayout.BeginVertical("Box");
                EditorGUILayout.PropertyField(m_SunMoonLightFade, new GUIContent("Sun Moon Light Fade"));
                EditorGUILayout.HelpBox("Evaluate Curve time by full sun cycle", MessageType.Info);
                EditorGUILayout.EndVertical();
                R_EditorGUIUtility.Separator(2);

                EditorGUILayout.Separator();
                //=======================================================================================================


                R_EditorGUIUtility.ShurikenHeader("Ambient", TextSectionStyle, 20);
                EditorGUILayout.Separator();

                EditorGUILayout.PropertyField(m_SendSkybox, new GUIContent("Send Skybox"));
                EditorGUILayout.PropertyField(m_AmbientUpdateInterval, new GUIContent("Ambient Update Interval"));

                EditorGUILayout.BeginVertical("Box");
                EditorGUILayout.PropertyField(m_AmbientGroundColor, new GUIContent("Ambient Ground Color"));
                EditorGUILayout.HelpBox("Evaluate Curve time by full sun cycle", MessageType.Info);
                EditorGUILayout.EndVertical();

                EditorGUILayout.Separator();
                //=======================================================================================================

                R_EditorGUIUtility.ShurikenHeader("Fog", TextSectionStyle, 20);
                EditorGUILayout.Separator();

                EditorGUILayout.PropertyField(m_EnableUnityFog, new GUIContent("Enable Unity Fog"));


                if (m_EnableUnityFog.boolValue)
                {
                    R_EditorGUIUtility.Separator(2);
                    EditorGUILayout.Separator();

                    EditorGUILayout.BeginVertical("Box");
                    EditorGUILayout.PropertyField(m_UnityFogColor, new GUIContent("Unity Fog Color"));
                    EditorGUILayout.HelpBox("Evaluate Curve time by full sun cycle", MessageType.Info);
                    EditorGUILayout.EndVertical();
                    R_EditorGUIUtility.Separator(2);

                    if (m_NightAtmosphereMode.enumValueIndex == 1)
                    {
                        EditorGUILayout.BeginVertical("Box");
                        EditorGUILayout.PropertyField(m_UnityMoonFogColor, new GUIContent("Unity Moon Fog Color"));
                        EditorGUILayout.HelpBox("Evaluate Curve time by moon above horizon", MessageType.Info);
                        EditorGUILayout.EndVertical();
                        R_EditorGUIUtility.Separator(2);
                    }
                    EditorGUILayout.Separator();

                    EditorGUILayout.PropertyField(m_UnityFogMode, new GUIContent("Unity Fog Mode"));
                    R_EditorGUIUtility.Separator(2);
                    EditorGUILayout.Separator();

                    if (m_UnityFogMode.enumValueIndex == 0)
                    {
                        EditorGUILayout.PropertyField(m_UnityFogStartDistance, new GUIContent("Unity Fog Start Distance"));
                        EditorGUILayout.PropertyField(m_UnityFogEndDistance, new GUIContent("Unity Fog End Distance"));
                    }
                    else
                    {
                        EditorGUILayout.PropertyField(m_UnityFogDensity, new GUIContent("Unity Fog Density"));
                    }
                }

                EditorGUILayout.Separator();
                //=======================================================================================================
            }
        }
Beispiel #9
0
        protected override void _OnInspectorGUI()
        {
            #region Time.

            R_EditorGUIUtility.ShurikenFoldoutHeader("Time", TextTitleStyle, ref m_TimeFoldout);

            if (m_TimeFoldout)
            {
                R_EditorGUIUtility.ShurikenHeader("Timeline", TextSectionStyle, 20);
                EditorGUILayout.Separator();

                GUI.backgroundColor = m_AllowProgressTime.boolValue ? green : red;

                EditorGUILayout.PropertyField(m_AllowProgressTime, new GUIContent("Allow Progress Time"));

                EditorGUILayout.BeginVertical();
                EditorGUILayout.PropertyField(m_Timeline, new GUIContent("Timeline"));
                EditorGUILayout.EndVertical();

                GUI.backgroundColor = Color.white;

                EditorGUILayout.Separator();


                R_EditorGUIUtility.ShurikenHeader("Time Length", TextSectionStyle, 20);
                EditorGUILayout.Separator();

                if (!m_SyncWithSystem.boolValue)
                {
                    GUI.backgroundColor = m_EnableDayNightLength.boolValue ? green : red;

                    EditorGUILayout.PropertyField(m_EnableDayNightLength, new GUIContent("Enable Day Night Length"));

                    GUI.backgroundColor = Color.white;

                    EditorGUILayout.BeginVertical(EditorStyles.helpBox);
                    if (m_EnableDayNightLength.boolValue)
                    {
                        if (!OverrideDayRange)
                        {
                            // Day Range.
                            float min = m_DayRange.vector2Value.x;
                            float max = m_DayRange.vector2Value.y;

                            R_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();

                            EditorGUILayout.Separator();
                        }
                        R_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();


                    R_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"));
                        EditorGUILayout.PropertyField(m_Milliseconds, new GUIContent("Milliseconds"));

                        GUI.backgroundColor = green;
                        if (GUILayout.Button("Set Time", GUILayout.MinHeight(30)))
                        {
                            tar.SetHour(m_Hour.intValue);
                            tar.SetMinute(m_Minute.intValue);
                            tar.SetSecond(m_Second.intValue);
                            tar.SetMillisecond(m_Milliseconds.intValue);
                        }
                        GUI.backgroundColor = Color.white;
                    }
                    EditorGUILayout.EndVertical();
                    EditorGUILayout.Separator();
                }
                EditorGUILayout.Separator();
            }


            #endregion

            #region Date

            R_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

            #region System.

            R_EditorGUIUtility.ShurikenFoldoutHeader("System", 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"));
                EditorGUILayout.Separator();
                GUI.backgroundColor = Color.white;
            }
            #endregion

            LastUpdateInspector();
        }