private void DrawMoonGUI()
        {
            string label = "Moon";
            string id    = "moon" + profile.GetInstanceID();;

            JEditorCommon.Foldout(label, false, id, () =>
            {
                profile.EnableMoon = EditorGUILayout.Toggle("Enable", profile.EnableMoon);
                if (profile.EnableMoon)
                {
                    profile.UseBakedMoon = EditorGUILayout.Toggle("Baked", profile.UseBakedMoon);
                }
                if (profile.EnableMoon && !profile.UseBakedMoon)
                {
                    profile.MoonTexture  = JEditorCommon.InlineTexture2DField("Texture", profile.MoonTexture, -1);
                    profile.MoonColor    = ColorField("Color", profile.MoonColor, true, true, true, nameof(profile.MoonColor));
                    profile.MoonSize     = Slider("Size", profile.MoonSize, 0f, 1f, nameof(profile.MoonSize));
                    profile.MoonSoftEdge = Slider("Soft Edge", profile.MoonSoftEdge, 0f, 1f, nameof(profile.MoonSoftEdge));
                    profile.MoonGlow     = Slider("Glow", profile.MoonGlow, 0f, 1f, nameof(profile.MoonGlow));
                }
                if (profile.EnableMoon && profile.UseBakedMoon)
                {
                    profile.MoonCubemap = JEditorCommon.InlineCubemapField("Cubemap", profile.MoonCubemap, -1);
                }
                if (profile.EnableMoon)
                {
                    profile.MoonLightColor     = ColorField("Light Color", profile.MoonLightColor, true, false, false, nameof(profile.MoonLightColor));
                    profile.MoonLightIntensity = FloatField("Light Intensity", profile.MoonLightIntensity, nameof(profile.MoonLightIntensity));
                }
            });
        }
        private void DrawSunGUI()
        {
            string label = "Sun";
            string id    = "sun" + profile.GetInstanceID();;

            JEditorCommon.Foldout(label, false, id, () =>
            {
                profile.EnableSun = EditorGUILayout.Toggle("Enable", profile.EnableSun);
                if (profile.EnableSun)
                {
                    profile.UseBakedSun = EditorGUILayout.Toggle("Baked", profile.UseBakedSun);
                }
                if (profile.EnableSun && !profile.UseBakedSun)
                {
                    profile.SunTexture  = JEditorCommon.InlineTexture2DField("Texture", profile.SunTexture, -1);
                    profile.SunColor    = EditorGUILayout.ColorField(new GUIContent("Color"), profile.SunColor, true, true, true);
                    profile.SunSize     = EditorGUILayout.Slider("Size", profile.SunSize, 0f, 1f);
                    profile.SunSoftEdge = EditorGUILayout.Slider("Soft Edge", profile.SunSoftEdge, 0f, 1f);
                    profile.SunGlow     = EditorGUILayout.Slider("Glow", profile.SunGlow, 0f, 1f);
                }
                if (profile.EnableSun && profile.UseBakedSun)
                {
                    profile.SunCubemap = JEditorCommon.InlineCubemapField("Cubemap", profile.SunCubemap, -1);
                }
                if (profile.EnableSun)
                {
                    profile.SunLightColor     = EditorGUILayout.ColorField("Light Color", profile.SunLightColor);
                    profile.SunLightIntensity = EditorGUILayout.FloatField("Light Intensity", profile.SunLightIntensity);
                }
            });
        }
        private void DrawMoonGUI()
        {
            string label = "Moon";
            string id    = "moon" + instance.GetInstanceID();;

            JEditorCommon.Foldout(label, false, id, () =>
            {
                instance.EnableMoon = EditorGUILayout.Toggle("Enable", instance.EnableMoon);
                if (instance.EnableMoon)
                {
                    instance.UseBakedMoon = EditorGUILayout.Toggle("Baked", instance.UseBakedMoon);
                }
                if (instance.EnableMoon && !instance.UseBakedMoon)
                {
                    instance.MoonTexture  = JEditorCommon.InlineTexture2DField("Texture", instance.MoonTexture, -1);
                    instance.MoonColor    = EditorGUILayout.ColorField(new GUIContent("Color"), instance.MoonColor, true, true, true);
                    instance.MoonSize     = EditorGUILayout.Slider("Size", instance.MoonSize, 0f, 1f);
                    instance.MoonSoftEdge = EditorGUILayout.Slider("Soft Edge", instance.MoonSoftEdge, 0f, 1f);
                    instance.MoonGlow     = EditorGUILayout.Slider("Glow", instance.MoonGlow, 0f, 1f);
                }
                if (instance.EnableMoon && instance.UseBakedMoon)
                {
                    instance.MoonCubemap = JEditorCommon.InlineCubemapField("Cubemap", instance.MoonCubemap, -1);
                }
                if (instance.EnableMoon)
                {
                    instance.MoonLightColor     = EditorGUILayout.ColorField("Light Color", instance.MoonLightColor);
                    instance.MoonLightIntensity = EditorGUILayout.FloatField("Light Intensity", instance.MoonLightIntensity);
                }
            });
        }
        private void DrawDetailOverlayGUI()
        {
            string label = "Detail Overlay";
            string id    = "detail-overlay" + profile.GetInstanceID();;

            JEditorCommon.Foldout(label, false, id, () =>
            {
                profile.EnableDetailOverlay = EditorGUILayout.Toggle("Enable", profile.EnableDetailOverlay);
                if (profile.EnableDetailOverlay)
                {
                    profile.DetailOverlayTintColor     = ColorField("Color", profile.DetailOverlayTintColor, true, true, false, nameof(profile.DetailOverlayTintColor));
                    profile.DetailOverlayCubeMap       = JEditorCommon.InlineCubemapField("Cubemap", profile.DetailOverlayCubeMap, -1);
                    profile.DetailOverlayLayer         = (JDetailOverlayLayer)EditorGUILayout.EnumPopup("Layer", profile.DetailOverlayLayer);
                    profile.DetailOverlayRotationSpeed = FloatField("Rotation Speed", profile.DetailOverlayRotationSpeed, nameof(profile.DetailOverlayRotationSpeed));
                }
            });
        }
        private void DrawStarsGUI()
        {
            string label = "Stars";
            string id    = "stars" + profile.GetInstanceID();;

            JEditorCommon.Foldout(label, false, id, () =>
            {
                profile.EnableStars = EditorGUILayout.Toggle("Enable", profile.EnableStars);
                if (profile.EnableStars)
                {
                    profile.UseBakedStars = EditorGUILayout.Toggle("Baked", profile.UseBakedStars);
                }
                if (profile.EnableStars && !profile.UseBakedStars)
                {
                    profile.StarsStartPosition = Slider("Start", profile.StarsStartPosition, -1, 1, nameof(profile.StarsStartPosition));
                    profile.StarsEndPosition   = Slider("End", profile.StarsEndPosition, -1, 1, nameof(profile.StarsEndPosition));
                    profile.StarsOpacity       = Slider("Opacity", profile.StarsOpacity, 0f, 1f, nameof(profile.StarsOpacity));
                    profile.StarsLayerCount    = EditorGUILayout.DelayedIntField("Layers", profile.StarsLayerCount);

                    if (profile.StarsLayerCount > 0)
                    {
                        JEditorCommon.Separator();
                        EditorGUILayout.LabelField("Layer 0");
                        EditorGUI.indentLevel += 1;
                        profile.StarsColor0    = ColorField("Color", profile.StarsColor0, true, true, true, nameof(profile.StarsColor0));
                        profile.StarsDensity0  = Slider("Density", profile.StarsDensity0, 0.01f, 1f, nameof(profile.StarsDensity0));
                        profile.StarsSize0     = Slider("Size", profile.StarsSize0, 0.01f, 1f, nameof(profile.StarsSize0));
                        profile.StarsGlow0     = Slider("Glow", profile.StarsGlow0, 0f, 1f, nameof(profile.StarsGlow0));
                        profile.StarsTwinkle0  = FloatField("Twinkle", profile.StarsTwinkle0, nameof(profile.StarsTwinkle0));
                        EditorGUI.indentLevel -= 1;
                    }

                    if (profile.StarsLayerCount > 1)
                    {
                        JEditorCommon.Separator();
                        EditorGUILayout.LabelField("Layer 1");
                        EditorGUI.indentLevel += 1;
                        profile.StarsColor1    = ColorField("Color", profile.StarsColor1, true, true, true, nameof(profile.StarsColor1));
                        profile.StarsDensity1  = Slider("Density", profile.StarsDensity1, 0.01f, 1f, nameof(profile.StarsDensity1));
                        profile.StarsSize1     = Slider("Size", profile.StarsSize1, 0.01f, 1f, nameof(profile.StarsSize1));
                        profile.StarsGlow1     = Slider("Glow", profile.StarsGlow1, 0f, 1f, nameof(profile.StarsGlow1));
                        profile.StarsTwinkle1  = FloatField("Twinkle", profile.StarsTwinkle1, nameof(profile.StarsTwinkle1));
                        EditorGUI.indentLevel -= 1;
                    }

                    if (profile.StarsLayerCount > 2)
                    {
                        JEditorCommon.Separator();
                        EditorGUILayout.LabelField("Layer 2");
                        EditorGUI.indentLevel += 1;
                        profile.StarsColor2    = ColorField("Color", profile.StarsColor2, true, true, true, nameof(profile.StarsColor2));
                        profile.StarsDensity2  = Slider("Density", profile.StarsDensity2, 0.01f, 1f, nameof(profile.StarsDensity2));
                        profile.StarsSize2     = Slider("Size", profile.StarsSize2, 0.01f, 1f, nameof(profile.StarsSize2));
                        profile.StarsGlow2     = Slider("Glow", profile.StarsGlow2, 0f, 1f, nameof(profile.StarsGlow2));
                        profile.StarsTwinkle2  = FloatField("Twinkle", profile.StarsTwinkle2, nameof(profile.StarsTwinkle2));
                        EditorGUI.indentLevel -= 1;
                    }
                }
                if (profile.EnableStars && profile.UseBakedStars)
                {
                    profile.StarsCubemap    = JEditorCommon.InlineCubemapField("Cubemap", profile.StarsCubemap, -1);
                    profile.StarsTwinkleMap = JEditorCommon.InlineTexture2DField("Twinkle Map", profile.StarsTwinkleMap, -1);
                    profile.StarsOpacity    = Slider("Opacity", profile.StarsOpacity, 0f, 1f, nameof(profile.StarsOpacity));
                }
            });
        }
        private void DrawStarsGUI()
        {
            string label = "Stars";
            string id    = "stars" + instance.GetInstanceID();;

            JEditorCommon.Foldout(label, false, id, () =>
            {
                instance.EnableStars = EditorGUILayout.Toggle("Enable", instance.EnableStars);
                if (instance.EnableStars)
                {
                    instance.UseBakedStars = EditorGUILayout.Toggle("Baked", instance.UseBakedStars);
                }
                if (instance.EnableStars && !instance.UseBakedStars)
                {
                    instance.StarsStartPosition = EditorGUILayout.Slider("Start", instance.StarsStartPosition, -1, 1);
                    instance.StarsEndPosition   = EditorGUILayout.Slider("End", instance.StarsEndPosition, -1, 1);
                    instance.StarsOpacity       = EditorGUILayout.Slider("Opacity", instance.StarsOpacity, 0f, 1f);
                    instance.StarsLayerCount    = EditorGUILayout.DelayedIntField("Layers", instance.StarsLayerCount);

                    if (instance.StarsLayerCount > 0)
                    {
                        JEditorCommon.Separator();
                        EditorGUILayout.LabelField("Layer 0");
                        EditorGUI.indentLevel += 1;
                        instance.StarsColor0   = EditorGUILayout.ColorField(new GUIContent("Color"), instance.StarsColor0, true, true, true);
                        instance.StarsDensity0 = EditorGUILayout.Slider("Density", instance.StarsDensity0, 0.01f, 1f);
                        instance.StarsSize0    = EditorGUILayout.Slider("Size", instance.StarsSize0, 0.01f, 1f);
                        instance.StarsGlow0    = EditorGUILayout.Slider("Glow", instance.StarsGlow0, 0f, 1f);
                        instance.StarsTwinkle0 = EditorGUILayout.FloatField("Twinkle", instance.StarsTwinkle0);
                        EditorGUI.indentLevel -= 1;
                    }

                    if (instance.StarsLayerCount > 1)
                    {
                        JEditorCommon.Separator();
                        EditorGUILayout.LabelField("Layer 1");
                        EditorGUI.indentLevel += 1;
                        instance.StarsColor1   = EditorGUILayout.ColorField(new GUIContent("Color"), instance.StarsColor1, true, true, true);
                        instance.StarsDensity1 = EditorGUILayout.Slider("Density", instance.StarsDensity1, 0.01f, 1f);
                        instance.StarsSize1    = EditorGUILayout.Slider("Size", instance.StarsSize1, 0.01f, 1f);
                        instance.StarsGlow1    = EditorGUILayout.Slider("Glow", instance.StarsGlow1, 0f, 1f);
                        instance.StarsTwinkle1 = EditorGUILayout.FloatField("Twinkle", instance.StarsTwinkle1);
                        EditorGUI.indentLevel -= 1;
                    }

                    if (instance.StarsLayerCount > 2)
                    {
                        JEditorCommon.Separator();
                        EditorGUILayout.LabelField("Layer 2");
                        EditorGUI.indentLevel += 1;
                        instance.StarsColor2   = EditorGUILayout.ColorField(new GUIContent("Color"), instance.StarsColor2, true, true, true);
                        instance.StarsDensity2 = EditorGUILayout.Slider("Density", instance.StarsDensity2, 0.01f, 1f);
                        instance.StarsSize2    = EditorGUILayout.Slider("Size", instance.StarsSize2, 0.01f, 1f);
                        instance.StarsGlow2    = EditorGUILayout.Slider("Glow", instance.StarsGlow2, 0f, 1f);
                        instance.StarsTwinkle2 = EditorGUILayout.FloatField("Twinkle", instance.StarsTwinkle2);
                        EditorGUI.indentLevel -= 1;
                    }
                }
                if (instance.EnableStars && instance.UseBakedStars)
                {
                    instance.StarsCubemap    = JEditorCommon.InlineCubemapField("Cubemap", instance.StarsCubemap, -1);
                    instance.StarsTwinkleMap = JEditorCommon.InlineTexture2DField("Twinkle Map", instance.StarsTwinkleMap, -1);
                    instance.StarsOpacity    = EditorGUILayout.Slider("Opacity", instance.StarsOpacity, 0f, 1f);
                }
            });
        }