Unity Surround开关后导致获取主显示器分辨率错误

buggggggg🚀

🌳现象

在使用过Nvidia Surround功能再关闭后,使用System.Windows.Forms.Screen.PrimaryScreen; 获取到的屏幕宽高会始终是Surround激活时的数值!!!升级了显卡驱动也没用!Σ(っ °Д °;)っ

🌳解决方案

使用Display.main获取主屏幕的宽高🆒

csharp 复制代码
// 获取主显示器的原生分辨率
Display primaryDisplay = Display.main;
int nativeWidth = primaryDisplay.systemWidth;
int nativeHeight = primaryDisplay.systemHeight;
相关推荐
jtymyxmz12 小时前
《Unity Shader》12.5 Bloom 效果
unity·游戏引擎
jtymyxmz13 小时前
《Unity Shader》12.6 运动模糊
unity·游戏引擎
jtymyxmz16 小时前
《Unity Shader》12.4.2 实现
unity·游戏引擎
sindyra18 小时前
Unity UGUI 之 Canvas Scaler
unity·游戏引擎
在路上看风景1 天前
2.Square Grid
unity
程序猿阿伟1 天前
《突破Unity热更新瓶颈:底层函数调用限制与生态适配秘籍》
unity·游戏引擎
在路上看风景1 天前
13. UGUI合批
unity
jtymyxmz2 天前
《Unity Shader》12.2调整屏幕的亮度、饱和度和对比度
unity·游戏引擎
AllBlue2 天前
unity嵌入安卓界面,如何显示状态
android·unity·游戏引擎
tealcwu2 天前
【Unity技巧】实现在Play时自动保存当前场景
java·unity·游戏引擎