2 Revize 90fc49d125 ... 11f307e9dc

Autor SHA1 Zpráva Datum
  slambb 11f307e9dc Merge branch 'NineAxisInfrared' of https://yuyekeji.cn/slambb/smart-bow-infrared into NineAxisInfrared před 1 týdnem
  slambb 502ba66167 蓝牙regex问题 před 1 týdnem

binární
Assets/AddressableAssetsData/Android/addressables_content_state.bin


+ 2 - 2
Assets/BowArrow/DoubleScene/Resources/AutoResetViewNew.prefab

@@ -144,9 +144,9 @@ MonoBehaviour:
     m_PersistentCalls:
       m_Calls: []
   m_FontData:
-    m_Font: {fileID: 12800000, guid: 1ad2cf6c2f09744489d8c60b3fe3bab2, type: 3}
+    m_Font: {fileID: 12800000, guid: 6b6cc7ab59ef00947950b61fdca2d042, type: 3}
     m_FontSize: 30
-    m_FontStyle: 0
+    m_FontStyle: 1
     m_BestFit: 0
     m_MinSize: 2
     m_MaxSize: 40

+ 12 - 6
Assets/BowArrow/InfraredCamera/InfraredDemo.cs

@@ -63,11 +63,14 @@ public class InfraredDemo : JCUnityLib.ViewBase
         if (obj != null)
         {
             reporter = obj.GetComponent<Reporter>();
-            //Application.logMessageReceived += HandleLog;
-            // 模拟错误日志
-            // Debug.LogError("Test Error: This is a simulated error message.");
-            // 模拟异常日志
-            // Debug.LogException(new System.Exception("Test Exception: This is a simulated exception."));
+
+            if (CommonConfig.bCaptureLog) {
+                Application.logMessageReceived += HandleLog;
+                // 模拟错误日志
+                Debug.LogError("测试错误:这是一条模拟错误消息。");
+                // 模拟异常日志
+                Debug.LogException(new System.Exception("测试异常:这是一个模拟异常。"));
+            }
         }
 
         if (Application.platform != RuntimePlatform.WindowsEditor) DebugInEditor = false;
@@ -100,7 +103,10 @@ public class InfraredDemo : JCUnityLib.ViewBase
     }
     void OnDestroy()
     {
-        //if (reporter != null) Application.logMessageReceived -= HandleLog;
+        if (CommonConfig.bCaptureLog)
+        {
+            if (reporter != null) Application.logMessageReceived -= HandleLog;
+        }
     }
 
     void Update()

+ 8 - 8
Assets/BowArrow/Resources/Prefabs/Views/AutoResetView.prefab

@@ -36,8 +36,8 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 1}
   m_AnchorMax: {x: 0, y: 1}
-  m_AnchoredPosition: {x: 60, y: -59.692307}
-  m_SizeDelta: {x: 0, y: 39.384613}
+  m_AnchoredPosition: {x: 60, y: -57.53846}
+  m_SizeDelta: {x: 0, y: 35.07692}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &1902031125379766742
 CanvasRenderer:
@@ -68,9 +68,9 @@ MonoBehaviour:
     m_PersistentCalls:
       m_Calls: []
   m_FontData:
-    m_Font: {fileID: 12800000, guid: 1ad2cf6c2f09744489d8c60b3fe3bab2, type: 3}
+    m_Font: {fileID: 12800000, guid: 6b6cc7ab59ef00947950b61fdca2d042, type: 3}
     m_FontSize: 30
-    m_FontStyle: 0
+    m_FontStyle: 1
     m_BestFit: 0
     m_MinSize: 2
     m_MaxSize: 40
@@ -240,9 +240,9 @@ MonoBehaviour:
     m_PersistentCalls:
       m_Calls: []
   m_FontData:
-    m_Font: {fileID: 12800000, guid: 1ad2cf6c2f09744489d8c60b3fe3bab2, type: 3}
+    m_Font: {fileID: 12800000, guid: 6b6cc7ab59ef00947950b61fdca2d042, type: 3}
     m_FontSize: 30
-    m_FontStyle: 0
+    m_FontStyle: 1
     m_BestFit: 0
     m_MinSize: 2
     m_MaxSize: 40
@@ -479,9 +479,9 @@ MonoBehaviour:
     m_PersistentCalls:
       m_Calls: []
   m_FontData:
-    m_Font: {fileID: 12800000, guid: 1ad2cf6c2f09744489d8c60b3fe3bab2, type: 3}
+    m_Font: {fileID: 12800000, guid: 6b6cc7ab59ef00947950b61fdca2d042, type: 3}
     m_FontSize: 30
-    m_FontStyle: 0
+    m_FontStyle: 1
     m_BestFit: 0
     m_MinSize: 2
     m_MaxSize: 40

+ 6 - 6
Assets/BowArrow/Resources/Prefabs/Views/AutoResetViewOrBg.prefab

@@ -68,9 +68,9 @@ MonoBehaviour:
     m_PersistentCalls:
       m_Calls: []
   m_FontData:
-    m_Font: {fileID: 12800000, guid: 1ad2cf6c2f09744489d8c60b3fe3bab2, type: 3}
+    m_Font: {fileID: 12800000, guid: 6b6cc7ab59ef00947950b61fdca2d042, type: 3}
     m_FontSize: 30
-    m_FontStyle: 0
+    m_FontStyle: 1
     m_BestFit: 0
     m_MinSize: 2
     m_MaxSize: 40
@@ -240,9 +240,9 @@ MonoBehaviour:
     m_PersistentCalls:
       m_Calls: []
   m_FontData:
-    m_Font: {fileID: 12800000, guid: 1ad2cf6c2f09744489d8c60b3fe3bab2, type: 3}
+    m_Font: {fileID: 12800000, guid: 6b6cc7ab59ef00947950b61fdca2d042, type: 3}
     m_FontSize: 30
-    m_FontStyle: 0
+    m_FontStyle: 1
     m_BestFit: 0
     m_MinSize: 2
     m_MaxSize: 40
@@ -609,9 +609,9 @@ MonoBehaviour:
     m_PersistentCalls:
       m_Calls: []
   m_FontData:
-    m_Font: {fileID: 12800000, guid: 1ad2cf6c2f09744489d8c60b3fe3bab2, type: 3}
+    m_Font: {fileID: 12800000, guid: 6b6cc7ab59ef00947950b61fdca2d042, type: 3}
     m_FontSize: 30
-    m_FontStyle: 0
+    m_FontStyle: 1
     m_BestFit: 0
     m_MinSize: 2
     m_MaxSize: 40

+ 5 - 5
Assets/BowArrow/Scripts/Bluetooth/BluetoothAim.cs

@@ -1842,23 +1842,23 @@ public class BluetoothAim : MonoBehaviour
                 Log("1P设备类型:" + firstPlayerType);
                 if (firstPlayerType == (int)AimDeviceType.HOUYIPRO)
                 {   //需要判断是否是红外弓箭
-                    ToRegex(targetDeviceNameHOUYIPro);
+                    regex = ToRegex(targetDeviceNameHOUYIPro);
                 }
                 else if (firstPlayerType == (int)AimDeviceType.ARTEMISPRO)
                 {   //需要判断是否是ARTEMISPro弓箭
-                    ToRegex(targetDeviceNameARTEMISPro);
+                    regex = ToRegex(targetDeviceNameARTEMISPro);
                 }
                 else if (firstPlayerType == (int)AimDeviceType.Gun)
                 {
-                    ToRegex(targetDeviceNameGun);
+                    regex = ToRegex(targetDeviceNameGun);
                 }
                 else if (firstPlayerType == (int)AimDeviceType.PistolM17)
                 {
-                    ToRegex(targetDeviceNameGun_M17);
+                    regex = ToRegex(targetDeviceNameGun_M17);
                 }
                 else if (firstPlayerType == (int)AimDeviceType.RifleM416)
                 {
-                    ToRegex(targetDeviceNameGun_M416);
+                    regex = ToRegex(targetDeviceNameGun_M416);
                 }
                 SmartBowLogger.Log(this, $"CMD StartScan:{regex}");
                 cmdManager.StartScan(regex);

+ 6 - 1
Assets/BowArrow/Scripts/CommonConfig.cs

@@ -193,7 +193,12 @@ public class CommonConfig
     /// <summary>
     /// 是否启动CMD来连接蓝牙
     /// </summary>
-    public static bool bUseCMD { get; } = true;
+    public static bool bUseCMD { get; } = false;
+
+    /// <summary>
+    /// 是否开启捕获错误日志
+    /// </summary>
+    public static bool bCaptureLog { get; } = false;
 }
 
 //打包App 的端

+ 5 - 5
Assets/Plugins/Android/AndroidManifest.xml

@@ -51,13 +51,13 @@
 	</application>
 
 	<!-- THE BELOW REQUIRES ASKING FOR LOCATION PERMISSION AT RUNTIME -->
-	<!--<uses-permission android:name="android.permission.BLUETOOTH"/> -->
-	<!--<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/> -->
-	<!--<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> -->
-	<!--<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> -->
+	<uses-permission android:name="android.permission.BLUETOOTH"/>
+	<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
+	<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
+	<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
 	<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>
 	<uses-permission android:name="android.permission.BLUETOOTH_SCAN"/>
-	<!--<uses-permission android:name="android.permission.BLUETOOTH_ADVERTISE"/> -->
+	<uses-permission android:name="android.permission.BLUETOOTH_ADVERTISE"/>
 	<uses-permission android:name="android.permission.BLUETOOTH_CONNECT"/>
 	<uses-permission android:name="android.permission.REQUEST_COMPANION_RUN_IN_BACKGROUND"/>
 	<uses-permission android:name="android.permission.REQUEST_COMPANION_USE_DATA_IN_BACKGROUND"/>

+ 4 - 0
Assets/ShotSimulator/Languages/Tables/LanguagesTable Shared Data.asset

@@ -529,6 +529,10 @@ MonoBehaviour:
     m_Key: Test
     m_Metadata:
       m_Items: []
+  - m_Id: 61751970103287808
+    m_Key: traintaskinfouiview_navbar_return_home
+    m_Metadata:
+      m_Items: []
   m_Metadata:
     m_Items: []
   m_KeyGenerator:

+ 4 - 0
Assets/ShotSimulator/Languages/Tables/LanguagesTable_en.asset

@@ -542,6 +542,10 @@ MonoBehaviour:
     m_Localized: TEST
     m_Metadata:
       m_Items: []
+  - m_Id: 61751970103287808
+    m_Localized: Return
+    m_Metadata:
+      m_Items: []
   references:
     version: 2
     RefIds:

+ 4 - 0
Assets/ShotSimulator/Languages/Tables/LanguagesTable_ja.asset

@@ -530,6 +530,10 @@ MonoBehaviour:
     m_Localized: "\u7167\u9580\u30FB\u7167\u661F\u30FB\u76EE\u6A19\u304C\u4E00\u76F4\u7DDA\u306B\u306A\u308B\u5C04\u6483\u59FF\u52E2\u3067\u3001\u753B\u9762\u4E2D\u592E\u306E\u8D64\u3044\u6A19\u7684\u306B\u7167\u6E96\u3092\u5408\u308F\u305B\u3066\u304F\u3060\u3055\u3044"
     m_Metadata:
       m_Items: []
+  - m_Id: 61751970103287808
+    m_Localized: "\u623B\u308B"
+    m_Metadata:
+      m_Items: []
   references:
     version: 2
     RefIds: []

+ 4 - 0
Assets/ShotSimulator/Languages/Tables/LanguagesTable_zh-Hans.asset

@@ -532,6 +532,10 @@ MonoBehaviour:
     m_Localized: "\u6D4B\u8BD5"
     m_Metadata:
       m_Items: []
+  - m_Id: 61751970103287808
+    m_Localized: "\u8FD4\u56DE"
+    m_Metadata:
+      m_Items: []
   references:
     version: 2
     RefIds:

+ 1 - 1
Assets/ShotSimulator/Resources/Prefabs/UI/TrainTaskInfoUIView.prefab

@@ -547,7 +547,7 @@ MonoBehaviour:
     m_TableReference:
       m_TableCollectionName: GUID:70c061568e128ba4eb5e3b74511068c0
     m_TableEntryReference:
-      m_KeyId: 31950367846400
+      m_KeyId: 61751970103287808
       m_Key: 
     m_FallbackState: 0
     m_WaitForCompletion: 0