Kaynağa Gözat

debug的部分再修改一下

ZIM 1 yıl önce
ebeveyn
işleme
bfc21a6228

+ 6 - 0
Assets/InfraredProject/WebCamera/Script/ZIM/DebugOnDemo.cs

@@ -14,6 +14,12 @@ public class DebugOnDemo : MonoBehaviour
         yield return null;
         yield return null;
         ScreenLocate.Main.DebugOnZIMDemo = true;
         ScreenLocate.Main.DebugOnZIMDemo = true;
         ScreenLocate.Main.SaveToggle.isOn = true;
         ScreenLocate.Main.SaveToggle.isOn = true;
+
+        ScreenLocate.Main.FullScreenToggle.gameObject.SetActive(true);
+        ScreenLocate.Main.FullScreenToggle.onValueChanged.AddListener((i) =>
+        {
+            Screen.fullScreen = i;
+        });
     }
     }
 
 
     void Update()
     void Update()

+ 8 - 13
Assets/InfraredProject/WebCamera/Script/ZIM/ScreenLocate.cs

@@ -174,13 +174,16 @@ public partial class ScreenLocate : MonoBehaviour
 
 
     static public void AutoLightPixels(Color[] pixels, int width, int height)
     static public void AutoLightPixels(Color[] pixels, int width, int height)
     {
     {
-        var newTex = pixels.zimAutoLightSimple(width, height);
-        DebugTexture(7, newTex);
-        try
+        if (Main.DebugOnZIMDemo)
         {
         {
-            Main.FullScreenImage.texture = newTex;
+            var newTex = pixels.zimAutoLightSimple(width, height);
+            DebugTexture(7, newTex);
+            try
+            {
+                Main.FullScreenImage.texture = newTex;
+            }
+            catch { }
         }
         }
-        catch { }
     }
     }
 
 
     static public void DebugTexture(int index, Texture texture)
     static public void DebugTexture(int index, Texture texture)
@@ -289,14 +292,6 @@ public partial class ScreenLocate : MonoBehaviour
             screenIdentification = new o0.Project.ScreenIdentification();
             screenIdentification = new o0.Project.ScreenIdentification();
             screenIdentification.LocateScreen();
             screenIdentification.LocateScreen();
         }
         }
-        if (DebugOnZIMDemo) {
-
-            FullScreenToggle.onValueChanged.AddListener((i) =>
-            {
-                Screen.fullScreen = i;
-            });
-
-        }
 
 
         infraredCount = InfraredCount.Single;
         infraredCount = InfraredCount.Single;
 
 

+ 2 - 2
Assets/InfraredProject/WebCamera/zimWebCamera.unity

@@ -1049,7 +1049,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 1
+  m_IsActive: 0
 --- !u!224 &517576268
 --- !u!224 &517576268
 RectTransform:
 RectTransform:
   m_ObjectHideFlags: 0
   m_ObjectHideFlags: 0
@@ -4780,7 +4780,7 @@ MonoBehaviour:
   ScreenPixelCheaker: {fileID: 2705055563390076282}
   ScreenPixelCheaker: {fileID: 2705055563390076282}
   InfraredSpotSettings: {fileID: 11400000, guid: ca2f3b215f8d9d64caed905436a89b86, type: 2}
   InfraredSpotSettings: {fileID: 11400000, guid: ca2f3b215f8d9d64caed905436a89b86, type: 2}
   DebugScreenImages: []
   DebugScreenImages: []
-  DebugOnZIMDemo: 1
+  DebugOnZIMDemo: 0
   bSinglePoint: 1
   bSinglePoint: 1
   m_UITime: {fileID: 849339071}
   m_UITime: {fileID: 849339071}
   updateInterval: 0.5
   updateInterval: 0.5