ZIM 1 год назад
Родитель
Сommit
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();
     }