public static void Draw(LightingSettings.Profile profile) { bool foldout = GUIFoldoutHeader.Begin("Quality", profile.qualitySettings); if (foldout == false) { GUIFoldoutHeader.End(); return; } EditorGUI.indentLevel++; EditorGUILayout.Space(); profile.qualitySettings.projection = (Projection)EditorGUILayout.EnumPopup("Projection", profile.qualitySettings.projection); profile.qualitySettings.coreAxis = (CoreAxis)EditorGUILayout.EnumPopup("Core Axis", profile.qualitySettings.coreAxis); profile.qualitySettings.updateMethod = (LightingSettings.UpdateMethod)EditorGUILayout.EnumPopup("Update Method", profile.qualitySettings.updateMethod); profile.qualitySettings.lightTextureSize = (LightingSourceTextureSize)EditorGUILayout.Popup("Light Resolution", (int)profile.qualitySettings.lightTextureSize, LightingSettings.QualitySettings.LightingSourceTextureSizeArray); profile.qualitySettings.lightEffectTextureSize = (LightingSourceTextureSize)EditorGUILayout.Popup("Light Effect Resolution", (int)profile.qualitySettings.lightEffectTextureSize, LightingSettings.QualitySettings.LightingSourceTextureSizeArray); profile.qualitySettings.lightFilterMode = (FilterMode)EditorGUILayout.EnumPopup("Light Filter Mode", profile.qualitySettings.lightFilterMode); profile.qualitySettings.HDR = EditorGUILayout.Toggle("Light HDR", profile.qualitySettings.HDR); EditorGUI.indentLevel--; GUIFoldoutHeader.End(); }
public static void Draw(LightingSettings.Profile profile) { bool foldout = GUIFoldoutHeader.Begin("Day Lighting", profile.dayLightingSettings); if (foldout == false) { GUIFoldoutHeader.End(); return; } EditorGUI.indentLevel++; EditorGUILayout.Space(); profile.dayLightingSettings.alpha = EditorGUILayout.Slider("Alpha", profile.dayLightingSettings.alpha, 0, 1); profile.dayLightingSettings.direction = EditorGUILayout.Slider("Direction", profile.dayLightingSettings.direction, 0, 360); profile.dayLightingSettings.height = EditorGUILayout.Slider("Height", profile.dayLightingSettings.height, 0.1f, 10); SunPenumbra.Draw(profile); NormalMap.Draw(profile); EditorGUI.indentLevel--; GUIFoldoutHeader.End(); }
public static void Draw(LightingSettings.Profile profile) { bool foldout = GUIFoldoutHeader.Begin("Layers", profile.layers); if (foldout == false) { GUIFoldoutHeader.End(); return; } EditorGUI.indentLevel++; EditorGUILayout.Space(); DrawList(profile.layers.lightLayers, "Light Layers", "Light Layer"); EditorGUILayout.Space(); DrawList(profile.layers.nightLayers, "Night Layers", "Night Layer"); EditorGUILayout.Space(); DrawList(profile.layers.dayLayers, "Day Layers", "Day Layer"); EditorGUI.indentLevel--; GUIFoldoutHeader.End(); }
public static void Draw(LightingSettings.ProjectSettings mainProfile) { bool foldout = GUIFoldoutHeader.Begin("Editor View", mainProfile.editorView); if (foldout == false) { GUIFoldoutHeader.End(); return; } EditorGUI.indentLevel++; EditorGUILayout.Space(); mainProfile.editorView.drawGizmos = (EditorDrawGizmos)EditorGUILayout.EnumPopup("Draw Gizmos", mainProfile.editorView.drawGizmos); mainProfile.editorView.drawGizmosBounds = (EditorGizmosBounds)EditorGUILayout.EnumPopup("Gizmos Bounds", mainProfile.editorView.drawGizmosBounds); EditorGUILayout.Space(); mainProfile.editorView.gameViewLayer = EditorGUILayout.LayerField("Game Layer (Default)", mainProfile.editorView.gameViewLayer); mainProfile.editorView.sceneViewLayer = EditorGUILayout.LayerField("Scene Layer (Default)", mainProfile.editorView.sceneViewLayer); EditorGUI.indentLevel--; GUIFoldoutHeader.End(); }
public static void Draw(LightingSettings.ProjectSettings mainProfile) { bool foldout = GUIFoldoutHeader.Begin("Chunks", mainProfile.chunks); if (foldout == false) { GUIFoldoutHeader.End(); return; } EditorGUI.indentLevel++; EditorGUILayout.Space(); mainProfile.chunks.enabled = EditorGUILayout.Toggle("Enable", mainProfile.chunks.enabled); mainProfile.chunks.chunkSize = EditorGUILayout.IntSlider("Chunk Size", mainProfile.chunks.chunkSize, 10, 100); EditorGUI.indentLevel--; GUIFoldoutHeader.End(); }
public static void Draw(EventPresetList lightPresetList) { bool foldout = GUIFoldoutHeader.Begin("Light Event Presets (" + (lightPresetList.list.Length - 1) + ")", lightPresetList); if (foldout == false) { GUIFoldoutHeader.End(); return; } EditorGUI.indentLevel++; int bufferCount = EditorGUILayout.IntSlider("Count", lightPresetList.list.Length - 1, 1, 4) + 1; if (bufferCount != lightPresetList.list.Length) { int oldCount = lightPresetList.list.Length; System.Array.Resize(ref lightPresetList.list, bufferCount); for (int i = oldCount; i < bufferCount; i++) { lightPresetList.list[i] = new EventPreset(i); } } for (int i = 1; i < lightPresetList.list.Length; i++) { bool fold = GUIFoldout.Draw("Preset " + (i), lightPresetList.list[i]); if (fold == false) { continue; } EditorGUI.indentLevel++; lightPresetList.list[i].name = EditorGUILayout.TextField("Name", lightPresetList.list[i].name); EditorGUILayout.Space(); DrawEventLayers(lightPresetList.list[i].layerSetting); EditorGUI.indentLevel--; } EditorGUI.indentLevel--; GUIFoldoutHeader.End(); }
public static void Draw(BufferPresetList bufferList) { bool foldout = GUIFoldoutHeader.Begin("Buffer Presets (" + bufferList.list.Length + ")", bufferList); if (foldout == false) { GUIFoldoutHeader.End(); return; } EditorGUI.indentLevel++; int bufferCount = EditorGUILayout.IntSlider("Count", bufferList.list.Length, 1, 4); if (bufferCount != bufferList.list.Length) { int oldCount = bufferList.list.Length; System.Array.Resize(ref bufferList.list, bufferCount); for (int i = oldCount; i < bufferCount; i++) { bufferList.list[i] = new BufferPreset(i); } } for (int i = 0; i < bufferList.list.Length; i++) { bool fold = GUIFoldout.Draw("Preset " + (i + 1), bufferList.list[i]); if (fold == false) { continue; } EditorGUI.indentLevel++; bufferList.list[i].name = EditorGUILayout.TextField("Name", bufferList.list[i].name); EditorGUILayout.Space(); CommonSettings(bufferList.list[i]); EditorGUILayout.Space(); if (Lighting2D.ProjectSettings.renderingMode == RenderingMode.OnRender) { SortingLayer(bufferList.list[i].sortingLayer); } EditorGUILayout.Space(); LayerSettings.DrawList(bufferList.list[i].dayLayers, "Day Layers (" + bufferList.list[i].dayLayers.list.Length + ")", Lighting2D.Profile.layers.dayLayers, true); EditorGUILayout.Space(); LayerSettings.DrawList(bufferList.list[i].nightLayers, "Night Layers (" + bufferList.list[i].nightLayers.list.Length + ")", Lighting2D.Profile.layers.nightLayers, false); EditorGUILayout.Space(); EditorGUI.indentLevel--; } EditorGUI.indentLevel--; GUIFoldoutHeader.End(); }