Created
August 11, 2025 15:33
-
-
Save RimuruDev/e2b35243441eac15b605fa1ab4c2abed to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| public sealed class ApplyDisplayRefreshRate : ILoadUnit | |
| { | |
| public UniTask Load() | |
| { | |
| QualitySettings.vSyncCount = 0; | |
| var hz = Mathf.RoundToInt(Screen.currentResolution.refreshRateRatio.value); | |
| Application.targetFrameRate = Mathf.Clamp(hz, 30, 240); | |
| return UniTask.CompletedTask; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment