瀏覽代碼

Update ScreenLocate.cs

ZIM 1 年之前
父節點
當前提交
483700a9a0
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Assets/InfraredProject/WebCamera/Script/ZIM/ScreenLocate.cs

+ 1 - 1
Assets/InfraredProject/WebCamera/Script/ZIM/ScreenLocate.cs

@@ -617,7 +617,7 @@ public partial class ScreenLocate : MonoBehaviour
     }
     public void OnLocateScreenEnter()
     {
-        DefaultResolutionIndex = (int)(InfraredDemoMain?.ResolutionIndex);        // 记录一下进入前的分辨率(游戏场景的分辨率,比识别时更低)
+        DefaultResolutionIndex = InfraredDemoMain?.ResolutionIndex ?? 0;        // 记录一下进入前的分辨率(游戏场景的分辨率,比识别时更低)
         InfraredDemoMain?.SetResolutionNew(HighScreenLocateResolutionIndex);
         CreateUVCTexture2DIfNeeded();
     }