1
This commit is contained in:
@@ -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
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user