Эх сурвалжийг харах

1.修复win系统下 塔防游戏的读取文件bug,
2.调整了红外分辨率等

slambb 1 жил өмнө
parent
commit
0086e05d0f

+ 4 - 0
Assets/BowArrow/InfraredCamera/InfraredDemo.cs

@@ -39,6 +39,10 @@ public class InfraredDemo : MonoBehaviour
         //InitInfraredCamera();
 
         Debug.Log("[InfraredDemo] Start Function!");
+
+#if UNITY_STANDALONE_WIN 
+        _calibrationFixedText.transform.parent.gameObject.SetActive(false);
+#endif
     }
 
 

+ 2 - 2
Assets/InfraredProject/Resources/WebCameraView_Pc.prefab

@@ -7691,8 +7691,8 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   cameraIndex: 0
-  width: 1280
-  height: 720
+  width: 320
+  height: 240
   fps: 30
   deviceName: 
   brightness: 0

+ 1 - 0
Assets/WildAttack/Scripts/Manager/GameMananger.cs

@@ -488,6 +488,7 @@ namespace WildAttack
 
         public void OnRotationUpdate(Quaternion rotation)
         {
+            if (CrossHairTrans == null) return;
             // 判断射击间隔
             if (shootSpawn <= GameModule.GetInstance().GetData("downTime") && shootSpawn > 0) return;
 

+ 10 - 5
Assets/WildAttack/Scripts/Utils/CSVUtils.cs

@@ -1,6 +1,8 @@
 using UnityEngine;
 using System.IO;
 using System.Text;
+using System;
+
 namespace WildAttack
 {
     /// <summary>
@@ -10,15 +12,18 @@ namespace WildAttack
     {
         public static string GetStreamingAssetPath() {
             string path =
-            #if UNITY_ANDROID && !UNITY_EDITOR
+#if UNITY_ANDROID && !UNITY_EDITOR
                     Application.streamingAssetsPath;
-            #elif UNITY_IPHONE && !UNITY_EDITOR
+#elif UNITY_IPHONE && !UNITY_EDITOR
                     "file://" + Application.streamingAssetsPath;
-            #elif UNITY_STANDLONE_WIN || UNITY_EDITOR
+#elif UNITY_STANDALONE_WIN  || UNITY_EDITOR
                     "file://" + Application.streamingAssetsPath;
-            #else
+#else
                     string.Empty;
-            #endif
+#endif
+            // 对路径进行 URL 编码
+            path = Uri.EscapeUriString(path);
+            //Debug.Log("读取文件路径:"+ path);
             return path;
         }