اسکریپت تنظیم گرافیک سی شارپ یونیتی
جمعه, ۸ آذر ۱۳۹۸، ۰۱:۴۲ ب.ظ
اسکریپت تنظیم گرافیک :
using UnityEngine; using System.Collections; public class SetGraphic : MonoBehaviour { // high graphic : public void high () { QualitySettings.anisotropicFiltering = AnisotropicFiltering.ForceEnable; QualitySettings.antiAliasing = 8; QualitySettings.softParticles = true; QualitySettings.realtimeReflectionProbes = true; QualitySettings.billboardsFaceCameraPosition = true; QualitySettings.shadows = ShadowQuality.HardOnly; QualitySettings.shadowResolution = ShadowResolution.VeryHigh; QualitySettings.shadowProjection = ShadowProjection.StableFit; QualitySettings.shadowDistance = 150; QualitySettings.shadowNearPlaneOffset = 3; QualitySettings.shadowCascades = 3; QualitySettings.blendWeights = BlendWeights.FourBones; QualitySettings.vSyncCount = 3; QualitySettings.lodBias = 2; QualitySettings.maximumLODLevel = 0; QualitySettings.particleRaycastBudget = 4096; QualitySettings.asyncUploadTimeSlice = 2; QualitySettings.asyncUploadBufferSize = 4; } // medium graphic : public void medium () { QualitySettings.anisotropicFiltering = AnisotropicFiltering.Enable; QualitySettings.antiAliasing = 4; QualitySettings.softParticles = true; QualitySettings.realtimeReflectionProbes = true; QualitySettings.billboardsFaceCameraPosition = true; QualitySettings.shadows = ShadowQuality.All; QualitySettings.shadowResolution = ShadowResolution.Medium; QualitySettings.shadowProjection = ShadowProjection.StableFit; QualitySettings.shadowDistance = 90; QualitySettings.shadowNearPlaneOffset = 2; QualitySettings.shadowCascades = 2; QualitySettings.blendWeights = BlendWeights.TwoBones; QualitySettings.vSyncCount = 2; QualitySettings.lodBias = 1; QualitySettings.maximumLODLevel = 0; QualitySettings.particleRaycastBudget = 2096; QualitySettings.asyncUploadTimeSlice = 1; QualitySettings.asyncUploadBufferSize = 3; } // low graphic : public void low () { QualitySettings.anisotropicFiltering = AnisotropicFiltering.Disable; QualitySettings.antiAliasing = 2; QualitySettings.softParticles = false; QualitySettings.realtimeReflectionProbes = false; QualitySettings.billboardsFaceCameraPosition = false; QualitySettings.shadows = ShadowQuality.Disable; QualitySettings.shadowResolution = ShadowResolution.Low; QualitySettings.shadowProjection = ShadowProjection.StableFit; QualitySettings.shadowDistance = 30; QualitySettings.shadowNearPlaneOffset = 1; QualitySettings.shadowCascades = 1; QualitySettings.blendWeights = BlendWeights.OneBone; QualitySettings.vSyncCount = 1; QualitySettings.lodBias = 0; QualitySettings.maximumLODLevel = 0; QualitySettings.particleRaycastBudget = 1096; QualitySettings.asyncUploadTimeSlice = 1; QualitySettings.asyncUploadBufferSize = 2; } }
برای استفاده مثلا میتونید 3 تا دکمه بسازید و هرکدوم از توابع عمومی توی اسکریپت رو بدید بهشون تا با کلیک روی دکمه تنظیم شه گرافیک
۹۸/۰۹/۰۸