示例#1
0
        void ComponentsAndResources()
        {
            AC_EditorUtility.Separator(SeparatorHeight);

            EditorGUILayout.PropertyField(applySkybox, new GUIContent("Apply Skybox"));
            EditorGUILayout.PropertyField(skyboxMaterial, new GUIContent("Skybox Material"));
            if (skyboxMaterial.objectReferenceValue == null)
            {
                EditorGUILayout.HelpBox("Skybox material no assigned", MessageType.Warning);
            }

            EditorGUILayout.PropertyField(moonTexture, new GUIContent("Moon Texture"));
            if (moonTexture.objectReferenceValue == null)
            {
                EditorGUILayout.HelpBox("Moon texture no assigned", MessageType.Warning);
            }

            EditorGUILayout.BeginVertical(EditorStyles.helpBox);
            {
                EditorGUILayout.PropertyField(outerSpaceCube, new GUIContent("Outer Space Cube"));

                EditorGUILayout.HelpBox("RGB = Nebula, A = StarField", MessageType.Info);

                if (outerSpaceCube.objectReferenceValue == null)
                {
                    EditorGUILayout.HelpBox("Outer space cubemap no assigned", MessageType.Warning);
                }
            }
            EditorGUILayout.EndVertical();


            EditorGUILayout.PropertyField(starsNoiseCube, new GUIContent("Stars Noise Cube"));
            if (starsNoiseCube.objectReferenceValue == null)
            {
                EditorGUILayout.HelpBox("Noise cubemap no assigned", MessageType.Warning);
            }

            AC_EditorUtility.Separator(SeparatorHeight);
            EditorGUILayout.Separator();

            EditorGUILayout.PropertyField(sunLight, new GUIContent("Sun Light"));
            if (sunLight.objectReferenceValue == null)
            {
                EditorGUILayout.HelpBox("Sun light no assigned", MessageType.Warning);
            }

            EditorGUILayout.PropertyField(moonLight, new GUIContent("Moon Light"));
            if (moonLight.objectReferenceValue == null)
            {
                EditorGUILayout.HelpBox("Moon light no assigned", MessageType.Warning);
            }

            AC_EditorUtility.Separator(SeparatorHeight);
            EditorGUILayout.Separator();
        }
示例#2
0
        void ColorCorrection()
        {
            AC_EditorUtility.Separator(SeparatorHeight);

            EditorGUILayout.PropertyField(HDR, new GUIContent("HDR"));

            EditorGUILayout.BeginHorizontal();
            {
                EditorGUILayout.PropertyField(exposure, new GUIContent(""));
                GUILayout.Button(new GUIContent("?", EvaluateInfoSun), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
            }
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.PropertyField(colorSpace, new GUIContent("Color Space"));

            AC_EditorUtility.Separator(SeparatorHeight);
            EditorGUILayout.Separator();
            //-------------------------------------------------------------------------------------------------------------------------------
        }
示例#3
0
        public override void OnInspectorGUI()
        {
            serObj.Update();

            EditorGUILayout.Separator();
            AC_EditorUtility.ShurikenHeader("LSky", TextTitleStyle, 30);

            AC_EditorUtility.ShurikenFoldoutHeader("Components And Resources", TextTitleStyle, CRFoldout);
            if (CRFoldout.boolValue)
            {
                ComponentsAndResources();
            }

            AC_EditorUtility.ShurikenFoldoutHeader("Atmosphere", TextTitleStyle, atmosphereFoldout);
            if (atmosphereFoldout.boolValue)
            {
                Atmosphere();
            }

            AC_EditorUtility.ShurikenFoldoutHeader("Celestials", TextTitleStyle, celestialsFoldout);
            if (celestialsFoldout.boolValue)
            {
                Celestials();
            }

            AC_EditorUtility.ShurikenFoldoutHeader("Color Correction", TextTitleStyle, colorCorrectionFoldout);
            if (colorCorrectionFoldout.boolValue)
            {
                ColorCorrection();
            }


            AC_EditorUtility.ShurikenFoldoutHeader("Lighting", TextTitleStyle, lightingFoldout);
            if (lightingFoldout.boolValue)
            {
                Lighting();
            }

            serObj.ApplyModifiedProperties();
        }
示例#4
0
        void Lighting()
        {
            AC_EditorUtility.Separator(SeparatorHeight);

            EditorGUILayout.BeginHorizontal();
            {
                EditorGUILayout.PropertyField(sunLightColor, new GUIContent(""));
                GUILayout.Button(new GUIContent("?", EvaluateInfoSun), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
            }
            EditorGUILayout.EndHorizontal();


            EditorGUILayout.BeginHorizontal();
            {
                EditorGUILayout.PropertyField(sunLightIntensity, new GUIContent(""));
                GUILayout.Button(new GUIContent("?", EvaluateInfoSun), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
            }
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            {
                EditorGUILayout.PropertyField(sunLightThreshold, new GUIContent("Sun Light Threshold"));
                GUILayout.Button(new GUIContent("?", "Enable/Disable sun light threshold"), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
            }
            EditorGUILayout.EndHorizontal();


            AC_EditorUtility.Separator(SeparatorHeight);
            EditorGUILayout.Separator();
            //-------------------------------------------------------------------------------------------------------------------------------

            EditorGUILayout.BeginHorizontal();
            {
                EditorGUILayout.PropertyField(moonLightColor, new GUIContent(""));
                GUILayout.Button(new GUIContent("?", EvaluateInfoMoonAbove), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
            }
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            {
                EditorGUILayout.PropertyField(moonLightIntensity, new GUIContent(""));
                GUILayout.Button(new GUIContent("?", EvaluateInfoMoonAbove), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
            }
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            {
                EditorGUILayout.PropertyField(moonLightMultiplier, new GUIContent("Sun Light Threshold"));
                GUILayout.Button(new GUIContent("?", EvaluateInfoSun), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
            }
            EditorGUILayout.EndHorizontal();

            AC_EditorUtility.Separator(SeparatorHeight);
            EditorGUILayout.Separator();
            //-------------------------------------------------------------------------------------------------------------------------------

            EditorGUILayout.PropertyField(ambientMode, new GUIContent("Ambient Mode"));

            if (ambientMode.enumValueIndex != 3)
            {
                if (ambientMode.enumValueIndex == 0)
                {
                    EditorGUILayout.BeginHorizontal();
                    {
                        EditorGUILayout.PropertyField(ambientIntensity, new GUIContent("Ambient Intensity"));
                        GUILayout.Button(new GUIContent("?", EvaluateInfoSun), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
                    }
                    EditorGUILayout.EndHorizontal();
                }

                if (ambientMode.enumValueIndex != 0)
                {
                    EditorGUILayout.BeginHorizontal();
                    {
                        EditorGUILayout.PropertyField(ambientSkyColor, new GUIContent("Ambient Sky Color"));
                        GUILayout.Button(new GUIContent("?", EvaluateInfoSun), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
                    }
                    EditorGUILayout.EndHorizontal();
                }

                if (ambientMode.enumValueIndex == 1)
                {
                    EditorGUILayout.BeginHorizontal();
                    {
                        EditorGUILayout.PropertyField(ambientEquatorColor, new GUIContent("Ambient Equator Color"));
                        GUILayout.Button(new GUIContent("?", EvaluateInfoSun), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
                    }
                    EditorGUILayout.EndHorizontal();
                }
            }

            EditorGUILayout.BeginHorizontal();
            {
                EditorGUILayout.PropertyField(ambientGroundColor, new GUIContent("Ambient Ground Color"));
                GUILayout.Button(new GUIContent("?", EvaluateInfoSun), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
            }
            EditorGUILayout.EndHorizontal();

            AC_EditorUtility.Separator(SeparatorHeight);
            EditorGUILayout.Separator();
            //-------------------------------------------------------------------------------------------------------------------------------

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

            if (enableUnityFog.boolValue)
            {
                EditorGUILayout.PropertyField(unityFogMode, new GUIContent("Unity Fog Mode"));

                EditorGUILayout.BeginHorizontal();
                {
                    EditorGUILayout.PropertyField(unityFogColor, new GUIContent(""));
                    GUILayout.Button(new GUIContent("?", EvaluateInfoSun), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
                }
                EditorGUILayout.EndHorizontal();

                if (unityFogMode.enumValueIndex != 0)
                {
                    EditorGUILayout.BeginHorizontal();
                    {
                        EditorGUILayout.PropertyField(unityFogDensity, new GUIContent(""));
                        GUILayout.Button(new GUIContent("?", EvaluateInfoSun), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
                    }
                    EditorGUILayout.EndHorizontal();
                }
                else
                {
                    EditorGUILayout.BeginHorizontal();
                    {
                        EditorGUILayout.PropertyField(unityFogStartDistance, new GUIContent(""));
                        GUILayout.Button(new GUIContent("?", EvaluateInfoSun), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
                    }
                    EditorGUILayout.EndHorizontal();


                    EditorGUILayout.BeginHorizontal();
                    {
                        EditorGUILayout.PropertyField(unityFogEndDistance, new GUIContent(""));
                        GUILayout.Button(new GUIContent("?", EvaluateInfoSun), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
                    }
                    EditorGUILayout.EndHorizontal();
                }
            }

            AC_EditorUtility.Separator(SeparatorHeight);
            EditorGUILayout.Separator();
            //-------------------------------------------------------------------------------------------------------------------------------
        }
示例#5
0
        void Celestials()
        {
            AC_EditorUtility.Separator(SeparatorHeight);

            EditorGUILayout.PropertyField(enableSunDisc, new GUIContent("Sun Disc"));
            if (enableSunDisc.boolValue)
            {
                EditorGUILayout.BeginHorizontal();
                {
                    EditorGUILayout.PropertyField(sunDiscSize, new GUIContent(""));
                    GUILayout.Button(new GUIContent("?", EvaluateInfoSunAbove), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
                }
                EditorGUILayout.EndHorizontal();

                EditorGUILayout.BeginHorizontal();
                {
                    EditorGUILayout.PropertyField(sunDiscColor, new GUIContent(""));
                    GUILayout.Button(new GUIContent("?", EvaluateInfoSunAbove), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
                }
                EditorGUILayout.EndHorizontal();
            }

            AC_EditorUtility.Separator(SeparatorHeight);
            EditorGUILayout.Separator();
            //-------------------------------------------------------------------------------------------------------------------------------

            EditorGUILayout.PropertyField(enableMoon, new GUIContent("Moon"));
            if (enableMoon.boolValue)
            {
                EditorGUILayout.BeginHorizontal();
                {
                    EditorGUILayout.PropertyField(moonSize, new GUIContent(""));
                    GUILayout.Button(new GUIContent("?", EvaluateInfoMoonAbove), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
                }
                EditorGUILayout.EndHorizontal();

                EditorGUILayout.BeginHorizontal();
                {
                    EditorGUILayout.PropertyField(moonColor, new GUIContent(""));
                    GUILayout.Button(new GUIContent("?", EvaluateInfoMoonAbove), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
                }
                EditorGUILayout.EndHorizontal();

                EditorGUILayout.BeginHorizontal();
                {
                    EditorGUILayout.PropertyField(moonIntensity, new GUIContent(""));
                    GUILayout.Button(new GUIContent("?", EvaluateInfoMoonAbove), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
                }
                EditorGUILayout.EndHorizontal();

                EditorGUILayout.BeginHorizontal();
                {
                    EditorGUILayout.PropertyField(moonMultiplier, new GUIContent(""));
                    GUILayout.Button(new GUIContent("?", EvaluateInfoSun), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
                }
                EditorGUILayout.EndHorizontal();
            }

            AC_EditorUtility.Separator(SeparatorHeight);
            EditorGUILayout.Separator();
            //-------------------------------------------------------------------------------------------------------------------------------


            EditorGUILayout.PropertyField(enableStars, new GUIContent("Stars"));
            if (enableStars.boolValue)
            {
                EditorGUILayout.BeginHorizontal();
                {
                    EditorGUILayout.PropertyField(starsColor, new GUIContent(""));
                    GUILayout.Button(new GUIContent("?", EvaluateInfoSun), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
                }
                EditorGUILayout.EndHorizontal();

                EditorGUILayout.BeginHorizontal();
                {
                    EditorGUILayout.PropertyField(starsIntensity, new GUIContent(""));
                    GUILayout.Button(new GUIContent("?", EvaluateInfoSun), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
                }
                EditorGUILayout.EndHorizontal();

                EditorGUILayout.BeginHorizontal();
                {
                    EditorGUILayout.PropertyField(starsScintillation, new GUIContent(""));
                    GUILayout.Button(new GUIContent("?", EvaluateInfoSun), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
                }
                EditorGUILayout.EndHorizontal();

                EditorGUILayout.BeginHorizontal();
                {
                    EditorGUILayout.PropertyField(starsScintillationSpeed, new GUIContent(""));
                    GUILayout.Button(new GUIContent("?", EvaluateInfoSun), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
                }
                EditorGUILayout.EndHorizontal();
            }

            AC_EditorUtility.Separator(SeparatorHeight);
            EditorGUILayout.Separator();
            //-------------------------------------------------------------------------------------------------------------------------------


            EditorGUILayout.PropertyField(enableNebula, new GUIContent("Nebula"));
            if (enableNebula.boolValue)
            {
                EditorGUILayout.BeginHorizontal();
                {
                    EditorGUILayout.PropertyField(nebulaColor, new GUIContent(""));
                    GUILayout.Button(new GUIContent("?", EvaluateInfoSun), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
                }
                EditorGUILayout.EndHorizontal();

                EditorGUILayout.BeginHorizontal();
                {
                    EditorGUILayout.PropertyField(nebulaIntensity, new GUIContent(""));
                    GUILayout.Button(new GUIContent("?", EvaluateInfoSun), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
                }
                EditorGUILayout.EndHorizontal();
            }

            if (enableStars.boolValue || enableNebula.boolValue)
            {
                EditorGUILayout.PropertyField(outerSpaceOffset, new GUIContent("Offsets"));
            }


            AC_EditorUtility.Separator(SeparatorHeight);
            EditorGUILayout.Separator();
            //-------------------------------------------------------------------------------------------------------------------------------
        }
示例#6
0
        void Atmosphere()
        {
            AC_EditorUtility.Separator(SeparatorHeight);

            EditorGUILayout.BeginHorizontal();
            {
                EditorGUILayout.PropertyField(wavelengthR, new GUIContent(""));
                GUILayout.Button(new GUIContent("?", EvaluateInfoSun), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
            }
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            {
                EditorGUILayout.PropertyField(wavelengthG, new GUIContent(""));
                GUILayout.Button(new GUIContent("?", EvaluateInfoSun), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
            }
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            {
                EditorGUILayout.PropertyField(wavelengthB, new GUIContent(""));
                GUILayout.Button(new GUIContent("?", EvaluateInfoSun), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
            }
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            {
                EditorGUILayout.PropertyField(atmosphereThickness, new GUIContent(""));
                GUILayout.Button(new GUIContent("?", EvaluateInfoSun), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
            }
            EditorGUILayout.EndHorizontal();

            AC_EditorUtility.Separator(SeparatorHeight);
            EditorGUILayout.Separator();
            //-------------------------------------------------------------------------------------------------------------------------------


            EditorGUILayout.BeginHorizontal();
            {
                EditorGUILayout.PropertyField(dayAtmosphereTint, new GUIContent(""));
                GUILayout.Button(new GUIContent("?", EvaluateInfoSunAbove), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
            }
            EditorGUILayout.EndHorizontal();


            EditorGUILayout.PropertyField(nightColorType, new GUIContent("Night Color Type"));
            moonInfluence.boolValue = EditorGUILayout.Toggle(new GUIContent("Moon Influence", "The moon affects the color of the atmosphere"), moonInfluence.boolValue, EditorStyles.radioButton);


            EditorGUILayout.BeginHorizontal();
            {
                EditorGUILayout.PropertyField(nightAtmosphereTint, new GUIContent(""));
                GUILayout.Button(new GUIContent("?", moonInfluence.boolValue ? EvaluateInfoMoonAbove : EvaluateInfoSunBelow), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
            }
            EditorGUILayout.EndHorizontal();

            AC_EditorUtility.Separator(SeparatorHeight);
            EditorGUILayout.Separator();
            //-------------------------------------------------------------------------------------------------------------------------------

            EditorGUILayout.BeginHorizontal();
            {
                EditorGUILayout.PropertyField(sunBrightness, new GUIContent(""));
                GUILayout.Button(new GUIContent("?", EvaluateInfoSun), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
            }
            EditorGUILayout.EndHorizontal();


            EditorGUILayout.BeginHorizontal();
            {
                EditorGUILayout.PropertyField(mie, new GUIContent(""));
                GUILayout.Button(new GUIContent("?", EvaluateInfoSun), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
            }
            EditorGUILayout.EndHorizontal();

            AC_EditorUtility.Separator(SeparatorHeight);
            EditorGUILayout.Separator();
            //-------------------------------------------------------------------------------------------------------------------------------

            EditorGUILayout.BeginHorizontal();
            {
                EditorGUILayout.PropertyField(sunMieColor, new GUIContent(""));
                GUILayout.Button(new GUIContent("?", EvaluateInfoSunAbove), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
            }
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            {
                EditorGUILayout.PropertyField(sunMieAnisotropy, new GUIContent(""));
                GUILayout.Button(new GUIContent("?", EvaluateInfoSunAbove), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
            }
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            {
                EditorGUILayout.PropertyField(sunMieScattering, new GUIContent(""));
                GUILayout.Button(new GUIContent("?", EvaluateInfoSunAbove), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
            }
            EditorGUILayout.EndHorizontal();

            AC_EditorUtility.Separator(SeparatorHeight);
            EditorGUILayout.Separator();
            //-------------------------------------------------------------------------------------------------------------------------------

            EditorGUILayout.BeginHorizontal();
            {
                EditorGUILayout.PropertyField(moonMieColor, new GUIContent(""));
                GUILayout.Button(new GUIContent("?", EvaluateInfoMoonAbove), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
            }
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            {
                EditorGUILayout.PropertyField(moonMieAnisotropy, new GUIContent(""));
                GUILayout.Button(new GUIContent("?", EvaluateInfoMoonAbove), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
            }
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            {
                EditorGUILayout.PropertyField(moonMieScattering, new GUIContent(""));
                GUILayout.Button(new GUIContent("?", EvaluateInfoMoonAbove), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
            }
            EditorGUILayout.EndHorizontal();


            EditorGUILayout.BeginHorizontal();
            {
                EditorGUILayout.PropertyField(moonMieMultiplier, new GUIContent(""));
                GUILayout.Button(new GUIContent("?", EvaluateInfoSun), EditorStyles.miniLabel, GUILayout.Width(InfoWidth));
            }
            EditorGUILayout.EndHorizontal();

            AC_EditorUtility.Separator(SeparatorHeight);
            EditorGUILayout.Separator();
            //-------------------------------------------------------------------------------------------------------------------------------
        }