private void DrawOverheadCloudGUI() { string label = "Overhead Cloud"; string id = "overhead-cloud" + profile.GetInstanceID();; JEditorCommon.Foldout(label, false, id, () => { profile.EnableOverheadCloud = EditorGUILayout.Toggle("Enable", profile.EnableOverheadCloud); if (profile.EnableOverheadCloud) { profile.CustomCloudTexture = JEditorCommon.InlineTexture2DField("Texture", profile.CustomCloudTexture, -1); profile.OverheadCloudColor = ColorField("Color", profile.OverheadCloudColor, true, true, false, nameof(profile.OverheadCloudColor)); profile.OverheadCloudAltitude = FloatField("Altitude", profile.OverheadCloudAltitude, nameof(profile.OverheadCloudAltitude)); profile.OverheadCloudSize = FloatField("Size", profile.OverheadCloudSize, nameof(profile.OverheadCloudSize)); if (profile.AllowStepEffect) { profile.OverheadCloudStep = EditorGUILayout.IntField("Step", profile.OverheadCloudStep); } profile.OverheadCloudAnimationSpeed = FloatField("Animation Speed", profile.OverheadCloudAnimationSpeed, nameof(profile.OverheadCloudAnimationSpeed)); profile.OverheadCloudFlowDirectionX = Slider("Flow X", profile.OverheadCloudFlowDirectionX, -1, 1, nameof(profile.OverheadCloudFlowDirectionX)); profile.OverheadCloudFlowDirectionZ = Slider("Flow Z", profile.OverheadCloudFlowDirectionZ, -1, 1, nameof(profile.OverheadCloudFlowDirectionZ)); profile.OverheadCloudRemapMin = FloatField("Remap Min", profile.OverheadCloudRemapMin, nameof(profile.OverheadCloudRemapMin)); profile.OverheadCloudRemapMax = FloatField("Remap Max", profile.OverheadCloudRemapMax, nameof(profile.OverheadCloudRemapMax)); profile.OverheadCloudCastShadow = EditorGUILayout.Toggle("Cast Shadow (Experimental)", profile.OverheadCloudCastShadow); if (profile.OverheadCloudCastShadow) { profile.OverheadCloudShadowClipMask = EditorGUILayout.Slider("Clip Mask", profile.OverheadCloudShadowClipMask, 0f, 1f); } } }); }
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 DrawHorizonCloudGUI() { string label = "Horizon Cloud"; string id = "horizon-cloud" + profile.GetInstanceID();; JEditorCommon.Foldout(label, false, id, () => { profile.EnableHorizonCloud = EditorGUILayout.Toggle("Enable", profile.EnableHorizonCloud); if (profile.EnableHorizonCloud) { profile.CustomCloudTexture = JEditorCommon.InlineTexture2DField("Texture", profile.CustomCloudTexture, -1); profile.HorizonCloudColor = ColorField("Color", profile.HorizonCloudColor, true, true, false, nameof(profile.HorizonCloudColor)); profile.HorizonCloudStartPosition = Slider("Start", profile.HorizonCloudStartPosition, -1, 1, nameof(profile.HorizonCloudStartPosition)); profile.HorizonCloudEndPosition = Slider("End", profile.HorizonCloudEndPosition, -1, 1, nameof(profile.HorizonCloudEndPosition)); profile.HorizonCloudSize = FloatField("Size", profile.HorizonCloudSize, nameof(profile.HorizonCloudSize)); if (profile.AllowStepEffect) { profile.HorizonCloudStep = EditorGUILayout.IntField("Step", profile.HorizonCloudStep); } profile.HorizonCloudAnimationSpeed = FloatField("Animation Speed", profile.HorizonCloudAnimationSpeed, nameof(profile.HorizonCloudAnimationSpeed)); } }); }
private void DrawHorizonCloudGUI() { string label = "Horizon Cloud"; string id = "horizon-cloud" + instance.GetInstanceID();; JEditorCommon.Foldout(label, false, id, () => { instance.EnableHorizonCloud = EditorGUILayout.Toggle("Enable", instance.EnableHorizonCloud); if (instance.EnableHorizonCloud) { instance.CustomCloudTexture = JEditorCommon.InlineTexture2DField("Texture", instance.CustomCloudTexture, -1); instance.HorizonCloudColor = EditorGUILayout.ColorField("Color", instance.HorizonCloudColor); instance.HorizonCloudStartPosition = EditorGUILayout.Slider("Start", instance.HorizonCloudStartPosition, -1, 1); instance.HorizonCloudEndPosition = EditorGUILayout.Slider("End", instance.HorizonCloudEndPosition, -1, 1); instance.HorizonCloudSize = EditorGUILayout.FloatField("Size", instance.HorizonCloudSize); if (instance.AllowStepEffect) { instance.HorizonCloudStep = EditorGUILayout.IntField("Step", instance.HorizonCloudStep); } instance.HorizonCloudAnimationSpeed = EditorGUILayout.FloatField("Animation Speed", instance.HorizonCloudAnimationSpeed); } }); }
private void DrawOverheadCloudGUI() { string label = "Overhead Cloud"; string id = "overhead-cloud" + profile.GetInstanceID();; JEditorCommon.Foldout(label, false, id, () => { profile.EnableOverheadCloud = EditorGUILayout.Toggle("Enable", profile.EnableOverheadCloud); if (profile.EnableOverheadCloud) { profile.CustomCloudTexture = JEditorCommon.InlineTexture2DField("Texture", profile.CustomCloudTexture, -1); profile.OverheadCloudColor = EditorGUILayout.ColorField("Color", profile.OverheadCloudColor); profile.OverheadCloudAltitude = EditorGUILayout.FloatField("Altitude", profile.OverheadCloudAltitude); profile.OverheadCloudSize = EditorGUILayout.FloatField("Size", profile.OverheadCloudSize); if (profile.AllowStepEffect) { profile.OverheadCloudStep = EditorGUILayout.IntField("Step", profile.OverheadCloudStep); } profile.OverheadCloudAnimationSpeed = EditorGUILayout.FloatField("Animation Speed", profile.OverheadCloudAnimationSpeed); profile.OverheadCloudFlowDirectionX = EditorGUILayout.Slider("Flow X", profile.OverheadCloudFlowDirectionX, -1, 1); profile.OverheadCloudFlowDirectionZ = EditorGUILayout.Slider("Flow Z", profile.OverheadCloudFlowDirectionZ, -1, 1); } }); }
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); } }); }