float OtherGroup(float xStart, float yStart) { float xPos = xStart + 25; float yPos = yStart + 25; GUI.Label(new Rect(xPos, yPos, sWidthHeight.x, sWidthHeight.y), EUtils.UnityColoredText("Other", headingColor)); yPos = yPos + sWidthHeight.y; //vSync GUI.Label(new Rect(xPos, yPos, sWidthHeight.x, sWidthHeight.y), "vSync: " + QualitySettings.vSyncCount); vSync = GUI.HorizontalSlider(new Rect(xPos + sWidthHeight.x, yPos, sWidthHeight.x, sWidthHeight.y), vSync, 0, maxvSync); QualitySettings.vSyncCount = (int)vSync; Save(saveTag + GetName(new { vSync }), vSync); yPos = yPos + sWidthHeight.y; //End vSync GUI.Label(new Rect(xPos, yPos, sWidthHeight.x + 100, sWidthHeight.y), "Limit frame rate only works when vSync is disabled(0)"); yPos = yPos + sWidthHeight.y; GUI.Label(new Rect(xPos, yPos, sWidthHeight.x, sWidthHeight.y), "Frame rate (0 = unlimited): " + Application.targetFrameRate); frameRate = GUI.HorizontalSlider(new Rect(xPos + sWidthHeight.x, yPos, sWidthHeight.x, sWidthHeight.y), frameRate, 0, maxFrameRate); Application.targetFrameRate = (int)frameRate; Save(saveTag + GetName(new { frameRate }), frameRate); yPos = yPos + sWidthHeight.y; //LoD Stuff LoDLevel = QualitySettings.maximumLODLevel; LoDBias = QualitySettings.lodBias; GUI.Label(new Rect(xPos, yPos, sWidthHeight.x, sWidthHeight.y), "Maximum LoD Level: " + QualitySettings.maximumLODLevel); LoDLevel = GUI.HorizontalSlider(new Rect(xPos + sWidthHeight.x, yPos, sWidthHeight.x, sWidthHeight.y), LoDLevel, 0, LoDLevelMax); QualitySettings.maximumLODLevel = (int)LoDLevel; Save(saveTag + GetName(new { LoDLevel }), LoDLevel); yPos = yPos + sWidthHeight.y; GUI.Label(new Rect(xPos, yPos, sWidthHeight.x, sWidthHeight.y), "LoD Bias: " + QualitySettings.lodBias); LoDBias = GUI.HorizontalSlider(new Rect(xPos + sWidthHeight.x, yPos, sWidthHeight.x, sWidthHeight.y), LoDBias, 0, LoDBiasMax); QualitySettings.lodBias = (int)LoDBias; Save(saveTag + GetName(new { LoDBias }), LoDBias); yPos = yPos + sWidthHeight.y; GUI.Label(new Rect(xPos, yPos, sWidthHeight.x, sWidthHeight.y), "Particle Raycast Budget: " + QualitySettings.particleRaycastBudget); particleRaycastBudget = GUI.HorizontalSlider(new Rect(xPos + sWidthHeight.x, yPos, sWidthHeight.x, sWidthHeight.y), particleRaycastBudget, 0, maxParticleRaycastBudget); particleRaycastBudget = (int)Mathf.ClosestPowerOfTwo((int)particleRaycastBudget); if (particleRaycastBudget < 4) { particleRaycastBudget = 4; } Save(saveTag + GetName(new { particleRaycastBudget }), particleRaycastBudget); QualitySettings.particleRaycastBudget = (int)Mathf.ClosestPowerOfTwo((int)particleRaycastBudget); return(yPos); }
float ShadowGroup(float xStart, float yStart) { float xPos = xStart + 25; float yPos = yStart + 25; GUI.Label(new Rect(xPos, yPos, sWidthHeight.x, sWidthHeight.y), EUtils.UnityColoredText("Shadow", headingColor)); yPos = yPos + sWidthHeight.y; GUI.Label(new Rect(xPos, yPos, sWidthHeight.x, sWidthHeight.y), "Shadow Projection: " + QualitySettings.shadowProjection.ToString()); yPos = yPos + sWidthHeight.y; if (GUI.Button(new Rect(xPos, yPos, bWidthHeight.x, bWidthHeight.y), ShadowProjection.CloseFit.ToString())) { shadowProjection = ShadowProjection.CloseFit; Save(saveTag + GetName(new { shadowProjection }), 0); } if (GUI.Button(new Rect(xPos + bWidthHeight.x, yPos, bWidthHeight.x, bWidthHeight.y), ShadowProjection.StableFit.ToString())) { shadowProjection = ShadowProjection.StableFit; Save(saveTag + GetName(new { shadowProjection }), 1); } QualitySettings.shadowProjection = shadowProjection; yPos = yPos + bWidthHeight.y; var cameraController = GameObject.FindObjectsOfType <CameraController>().First(); GUI.Label(new Rect(xPos, yPos, sWidthHeight.x, sWidthHeight.y), "Max Shadow Distance: " + cameraController.m_maxShadowDistance); maxShadowDistance = GUI.HorizontalSlider(new Rect(xPos + sWidthHeight.x, yPos, sWidthHeight.x, sWidthHeight.y), maxShadowDistance, 0, shadowDistanceLimit); cameraController.m_maxShadowDistance = maxShadowDistance; Save(saveTag + GetName(new { shadowDistance = maxShadowDistance }), maxShadowDistance); yPos = yPos + sWidthHeight.y; GUI.Label(new Rect(xPos, yPos, sWidthHeight.x, sWidthHeight.y), "Shadow Cascade: " + QualitySettings.shadowCascades); shadowCascade = GUI.HorizontalSlider(new Rect(xPos + sWidthHeight.x, yPos, sWidthHeight.x, sWidthHeight.y), shadowCascade, 0, maxShadowCascade); shadowCascade = (int)Mathf.ClosestPowerOfTwo((int)shadowCascade); Save(saveTag + GetName(new { shadowCascade }), shadowCascade); if (shadowCascade == 1) { shadowCascade = 0; } QualitySettings.shadowCascades = (int)Mathf.ClosestPowerOfTwo((int)shadowCascade); return(yPos); }
float ExtraGroup(float xStart, float yStart) { float xPos = xStart + 25; float yPos = yStart + 25; GUI.Label(new Rect(xPos, yPos, sWidthHeight.x, sWidthHeight.y), EUtils.UnityColoredText("Extra Options", headingColor)); yPos = yPos + sWidthHeight.y; if (GetCameraBehaviour("FogEffect") != null) { GetCameraBehaviour("FogEffect").enabled = GUI.Toggle(new Rect(xPos, yPos, sWidthHeight.x, sWidthHeight.y), GetCameraBehaviour("FogEffect").enabled, "Fog Effect GameObject"); yPos = yPos + sWidthHeight.y; /* * GUI.Label(new Rect(xPos, yPos, sWidthHeight.x, sWidthHeight.y), "3D Fog Amount: " + EUtils.GetFieldValue(GetCameraBehaviour("FogEffect"),"m_3DFogAmount")); * m_3DFogAmount = GUI.HorizontalSlider(new Rect(xPos + sWidthHeight.x, yPos, sWidthHeight.x, sWidthHeight.y), m_3DFogAmount, 0, m_3DFogAmountMax); * EUtils.SetFieldValue(GetCameraBehaviour("FogEffect"),"m_3DFogAmount",m_3DFogAmount); * yPos = yPos + sWidthHeight.y; * * GUI.Label(new Rect(xPos, yPos, sWidthHeight.x, sWidthHeight.y), "3D Fog Start: " + EUtils.GetFieldValue(GetCameraBehaviour("FogEffect"),"m_3DFogStart")); * m_3DFogStart = GUI.HorizontalSlider(new Rect(xPos + sWidthHeight.x, yPos, sWidthHeight.x, sWidthHeight.y), m_3DFogStart, 0, m_3DFogStartMax); * EUtils.SetFieldValue(GetCameraBehaviour("FogEffect"),"m_3DFogStart",m_3DFogStart); * yPos = yPos + sWidthHeight.y; * * GUI.Label(new Rect(xPos, yPos, sWidthHeight.x, sWidthHeight.y), "3D Fog Distance: " + EUtils.GetFieldValue(GetCameraBehaviour("FogEffect"),"m_3DFogDistance")); * m_3DFogDistance = GUI.HorizontalSlider(new Rect(xPos + sWidthHeight.x, yPos, sWidthHeight.x, sWidthHeight.y), m_3DFogDistance, 0, m_3DFogDistanceMax); * EUtils.SetFieldValue(GetCameraBehaviour("FogEffect"),"m_3DFogDistance",m_3DFogDistance); * yPos = yPos + sWidthHeight.y; * * GUI.Label(new Rect(xPos, yPos, sWidthHeight.x, sWidthHeight.y), "3D Noise Step Size: " + EUtils.GetFieldValue(GetCameraBehaviour("FogEffect"),"m_3DNoiseStepSize")); * m_3DNoiseStepSize = GUI.HorizontalSlider(new Rect(xPos + sWidthHeight.x, yPos, sWidthHeight.x, sWidthHeight.y), m_3DNoiseStepSize, 0, m_3DNoiseStepSizeMax); * EUtils.SetFieldValue(GetCameraBehaviour("FogEffect"),"m_3DNoiseStepSize",m_3DNoiseStepSize); * yPos = yPos + sWidthHeight.y; * * GUI.Label(new Rect(xPos, yPos, sWidthHeight.x, sWidthHeight.y), "3D Noise Scale: " + EUtils.GetFieldValue(GetCameraBehaviour("FogEffect"),"m_3DNoiseScale")); * m_3DNoiseScale = GUI.HorizontalSlider(new Rect(xPos + sWidthHeight.x, yPos, sWidthHeight.x, sWidthHeight.y), m_3DNoiseScale, 0, m_3DFogAmountMax); * EUtils.SetFieldValue(GetCameraBehaviour("FogEffect"),"m_3DNoiseScale",m_3DNoiseScale); * yPos = yPos + sWidthHeight.y; */ } if (GetCameraBehaviour("DayNightFogEffect") != null) { GetCameraBehaviour("DayNightFogEffect").enabled = GUI.Toggle(new Rect(xPos, yPos, sWidthHeight.x, sWidthHeight.y), GetCameraBehaviour("DayNightFogEffect").enabled, "Day Night Fog Effect GameObject"); yPos = yPos + sWidthHeight.y; } if (renderProperties != null) { ToggleGroup("Use Volume Fog", xPos, ref yPos, renderProperties.m_useVolumeFog, ref Configuration.instance.fogClassic.useVolumeFog, ref Configuration.instance.isFogClassicDirty); HorizontalSliderGroup("Fog Height", xPos, ref yPos, renderProperties.m_fogHeight, FogClassicConstants.FogHeightMin, FogClassicConstants.FogHeightMax, ref Configuration.instance.fogClassic.fogHeight, ref Configuration.instance.isFogClassicDirty); HorizontalSliderGroup("Edge Fog Distance", xPos, ref yPos, renderProperties.m_edgeFogDistance, FogClassicConstants.EdgeFogDistanceMin, FogClassicConstants.EdgeFogDistanceMax, ref Configuration.instance.fogClassic.edgeFogDistance, ref Configuration.instance.isFogClassicDirty); HorizontalSliderGroup("Volume Fog Density", xPos, ref yPos, renderProperties.m_volumeFogDensity, FogClassicConstants.VolumeFogDensityMin, FogClassicConstants.VolumeFogDensityMax, ref Configuration.instance.fogClassic.volumeFogDensity, ref Configuration.instance.isFogClassicDirty); HorizontalSliderGroup("Volume Fog Start", xPos, ref yPos, renderProperties.m_volumeFogStart, FogClassicConstants.VolumeFogStartMin, FogClassicConstants.VolumeFogStartMax, ref Configuration.instance.fogClassic.volumeFogStart, ref Configuration.instance.isFogClassicDirty); HorizontalSliderGroup("Volume Fog Distance", xPos, ref yPos, renderProperties.m_volumeFogDistance, FogClassicConstants.VolumeFogDistanceMin, FogClassicConstants.VolumeFogDistanceMax, ref Configuration.instance.fogClassic.volumeFogDistance, ref Configuration.instance.isFogClassicDirty); HorizontalSliderGroup("Pollution Fog Intensity", xPos, ref yPos, renderProperties.m_pollutionFogIntensity, FogClassicConstants.PollutionFogIntensityMin, FogClassicConstants.PollutionFogIntensityMax, ref Configuration.instance.fogClassic.pollutionFogIntensity, ref Configuration.instance.isFogClassicDirty); if (Configuration.instance.isFogClassicDirty) { SetFogClassicOptions(); } if (GUI.Button(new Rect(xPos, yPos, bWidthHeight.x * 2, bWidthHeight.y), "Reset Fog Settings")) { ResetToDefault(); } yPos = yPos + sWidthHeight.y; } if (GetCameraBehaviour("Bloom") != null) { GetCameraBehaviour("Bloom").enabled = GUI.Toggle(new Rect(xPos, yPos, sWidthHeight.x, sWidthHeight.y), GetCameraBehaviour("Bloom").enabled, "Bloom"); yPos = yPos + sWidthHeight.y; } if (GetCameraBehaviour("ToneMapping") != null) { GetCameraBehaviour("ToneMapping").enabled = GUI.Toggle(new Rect(xPos, yPos, sWidthHeight.x, sWidthHeight.y), GetCameraBehaviour("ToneMapping").enabled, "Tone Mapping"); yPos = yPos + sWidthHeight.y; } if (GetCameraBehaviour("ColorCorrectionLut") != null) { GetCameraBehaviour("ColorCorrectionLut").enabled = GUI.Toggle(new Rect(xPos, yPos, sWidthHeight.x, sWidthHeight.y), GetCameraBehaviour("ColorCorrectionLut").enabled, "Color Correction Lut"); yPos = yPos + sWidthHeight.y; } if (GetCameraBehaviour("OverLayEffect") != null) { GetCameraBehaviour("OverLayEffect").enabled = GUI.Toggle(new Rect(xPos, yPos, sWidthHeight.x, sWidthHeight.y), GetCameraBehaviour("OverLayEffect").enabled, "Over Lay Effect"); yPos = yPos + sWidthHeight.y; } /* * if(GetCameraBehaviour("SMAA") != null) * { * GetCameraBehaviour("SMAA").enabled = GUI.Toggle(new Rect(xPos, yPos, sWidthHeight.x, sWidthHeight.y), GetCameraBehaviour("SMAA").enabled, "SMAA"); * yPos = yPos + sWidthHeight.y; * }*/ /*Added Effects * sSAOC.enabled = GUI.Toggle(new Rect(xPos, yPos, sWidthHeight.x, sWidthHeight.y),sSAOC.enabled, "SSOAC"); * yPos = yPos + sWidthHeight.y; * sSAOB.enabled = GUI.Toggle(new Rect(xPos, yPos, sWidthHeight.x, sWidthHeight.y),sSAOB.enabled, "sSAOB"); * yPos = yPos + sWidthHeight.y; * edgeDetection.enabled = GUI.Toggle(new Rect(xPos, yPos, sWidthHeight.x, sWidthHeight.y),edgeDetection.enabled, "Edge Detection"); * yPos = yPos + sWidthHeight.y; * creaseShading.enabled = GUI.Toggle(new Rect(xPos, yPos, sWidthHeight.x, sWidthHeight.y),creaseShading.enabled, "Crease Shading"); * yPos = yPos + sWidthHeight.y; */ /* * //Kill Seagull sounds * killSeagullSounds = GUI.Toggle(new Rect(xPos, yPos, sWidthHeight.x, sWidthHeight.y), killSeagullSounds, "Kill Seagull Sounds"); * yPos = yPos + sWidthHeight.y; */ //END //killSeagull = GUI.Toggle(new Rect(xPos, yPos, sWidthHeight.x, sWidthHeight.y), killSeagull, "Kill Seagulls"); //yPos = yPos + sWidthHeight.y; //End return(yPos); }
// float ResolutionGroup(float xStart, float yStart) // { // float xPos = xStart + 25; // float yPos = yStart + 25; // GUI.Label(new Rect(xPos, yPos, sWidthHeight.x, sWidthHeight.y), EUtils.UnityColoredText("Resolutions", headingColor)); // yPos = yPos + sWidthHeight.y; // fullScreen = GUI.Toggle(new Rect(xPos, yPos, sWidthHeight.x, sWidthHeight.y), fullScreen, "Full screen"); // yPos = yPos + sWidthHeight.y; // float maxHeight = yPos + (Mathf.Floor(Screen.resolutions.Length / 3) * (sWidthHeight.y)); // Resolution[] resolutions = Screen.resolutions; // for (int i = 0; i < resolutions.Length; i++) // { // float newXPos = xPos + (i % 3) * (bWidthHeight.x); // float newYPos = yPos + (Mathf.Floor(i / 3) * (bWidthHeight.y)); // if (GUI.Button(new Rect(newXPos, newYPos, bWidthHeight.x, bWidthHeight.y), resolutions[i].width + "x" + resolutions[i].height + " " + resolutions[i].refreshRate)) // { // Screen.SetResolution(resolutions[i].width, resolutions[i].height, fullScreen, resolutions[i].refreshRate); // optionWindowRect.x = 0; // optionWindowRect.y = 0; // } // } // return maxHeight; // } float RenderingGroup(float xStart, float yStart) { float xPos = xStart + 25; float yPos = yStart + 25; GUI.Label(new Rect(xPos, yPos, sWidthHeight.x, sWidthHeight.y), EUtils.UnityColoredText("Rendering", headingColor)); yPos = yPos + sWidthHeight.y; //Anti Analysing GUI.Label(new Rect(xPos, yPos, sWidthHeight.x, sWidthHeight.y), "Antialiasing: " + QualitySettings.antiAliasing); antiAliasing = GUI.HorizontalSlider(new Rect(xPos + sWidthHeight.x, yPos, sWidthHeight.x, sWidthHeight.y), antiAliasing, 0, maxAntiAliasing); if (antiAliasing != QualitySettings.antiAliasing) { antiAliasing = (int)Mathf.ClosestPowerOfTwo((int)antiAliasing); if (antiAliasing == 1) { antiAliasing = 0; } QualitySettings.antiAliasing = (int)Mathf.ClosestPowerOfTwo((int)antiAliasing); Save(saveTag + GetName(new { antiAliasing }), antiAliasing); } //End anti Analysing //Anisotropic Filtering yPos = yPos + sWidthHeight.y; GUI.Label(new Rect(xPos, yPos, sWidthHeight.x, sWidthHeight.y), "Anisotropic Filtering: " + QualitySettings.anisotropicFiltering.ToString()); yPos = yPos + sWidthHeight.y; if (GUI.Button(new Rect(xPos, yPos, bWidthHeight.x, bWidthHeight.y), AnisotropicFiltering.Disable.ToString())) { anisotropicFilt = AnisotropicFiltering.Disable; Save(saveTag + GetName(new { anisotropicFilt }), 0); } if (GUI.Button(new Rect(xPos + bWidthHeight.x, yPos, bWidthHeight.x, bWidthHeight.y), AnisotropicFiltering.Enable.ToString())) { anisotropicFilt = AnisotropicFiltering.Enable; Save(saveTag + GetName(new { anisotropicFilt }), 1); } if (GUI.Button(new Rect(xPos + (bWidthHeight.x * 2), yPos, bWidthHeight.x, bWidthHeight.y), AnisotropicFiltering.ForceEnable.ToString())) { anisotropicFilt = AnisotropicFiltering.ForceEnable; Save(saveTag + GetName(new { anisotropicFilt }), 2); } QualitySettings.anisotropicFiltering = anisotropicFilt; //End Anisotropic Filtering //Texture Quality yPos = yPos + bWidthHeight.y; GUI.Label(new Rect(xPos, yPos, sWidthHeight.x, sWidthHeight.y), "Texture Quality(Beter to worse): " + QualitySettings.masterTextureLimit); textureQuality = GUI.HorizontalSlider(new Rect(xPos + sWidthHeight.x, yPos, sWidthHeight.x, 25), textureQuality, 0, maxTextureQuality); QualitySettings.masterTextureLimit = (int)textureQuality; Save(saveTag + GetName(new { textureQuality }), textureQuality); //End Texture Quality //Pixel Light Count yPos = yPos + sWidthHeight.y; GUI.Label(new Rect(xPos, yPos, sWidthHeight.x, sWidthHeight.y), "Pixel Light Count: " + QualitySettings.pixelLightCount); pixelLightCount = GUI.HorizontalSlider(new Rect(xPos + sWidthHeight.x, yPos, sWidthHeight.x, sWidthHeight.y), pixelLightCount, 0, maxPixelLightCount); QualitySettings.pixelLightCount = (int)pixelLightCount; Save(saveTag + GetName(new { pixelLightCount }), pixelLightCount); //End Pixel Light Count return(yPos); }