This commit is contained in:
2026-08-05 14:18:41 +08:00
parent cbec8d6306
commit 8128e8fc77
5 changed files with 49 additions and 12 deletions
+4 -2
View File
@@ -203,14 +203,16 @@ public class GameManager : MonoSingleton<GameManager>
// ⭐ 游戏启动时加载已保存的画质和帧率设置
int quality = PlayerPrefs.GetInt("GraphicsQuality", 1);
QualitySettings.SetQualityLevel(quality, true);
// applyExpensiveChanges=false:URP 下切换画质会重建渲染管线,立即应用(true)易触发 GPU 重置闪退
QualitySettings.SetQualityLevel(quality, false);
int fps = PlayerPrefs.GetInt("TargetFps", 1);
// 中高档统一为 60 帧。移动端强制垂直同步,45 不可用(60Hz 整数倍才合法),故中档按 60 处理。
Application.targetFrameRate = fps switch
{
0 => 30,
1 => 60,
2 => -1,
2 => 60,
_ => 60
};