소스 검색

1.修复了报错问题,去除了ui位置打印

slambb 1 년 전
부모
커밋
52d489db21
2개의 변경된 파일9개의 추가작업 그리고 6개의 파일을 삭제
  1. 2 2
      Assets/Game_Hyperspace/Script/ShootingEvent.cs
  2. 7 4
      Assets/InfraredProject/WebCamera/Script/ZIM/ScreenLocate.cs

+ 2 - 2
Assets/Game_Hyperspace/Script/ShootingEvent.cs

@@ -58,7 +58,7 @@ public class ShootingEvent : MonoBehaviour
     {
         _point = point;
 
-        Debug.LogWarning($"OnPositionUpdate  point={point}");
+        //Debug.LogWarning($"OnPositionUpdate  point={point}");
         var viewPoint = Camera.main.ScreenToViewportPoint(point);
         var width = _canvasRectTransform.sizeDelta.x;
         var height = _canvasRectTransform.sizeDelta.y;
@@ -66,7 +66,7 @@ public class ShootingEvent : MonoBehaviour
         point.y = height * viewPoint.y;
         var uiPos = new Vector3(point.x - width * 0.5f, point.y - height * 0.5f, -275f);        
 
-        Debug.LogWarning($"uiPos={uiPos}");
+        //Debug.LogWarning($"uiPos={uiPos}");
         _rectTransform.localPosition = uiPos;//×¼ÐÄUIλÖÃ
     }
 

+ 7 - 4
Assets/InfraredProject/WebCamera/Script/ZIM/ScreenLocate.cs

@@ -289,11 +289,14 @@ public partial class ScreenLocate : MonoBehaviour
             screenIdentification = new o0.Project.ScreenIdentification();
             screenIdentification.LocateScreen();
         }
+        if (DebugOnZIMDemo) {
 
-        FullScreenToggle.onValueChanged.AddListener((i) =>
-        {
-            Screen.fullScreen = i;
-        });
+            FullScreenToggle.onValueChanged.AddListener((i) =>
+            {
+                Screen.fullScreen = i;
+            });
+
+        }
 
         infraredCount = InfraredCount.Single;