lvjincheng 3 years ago
parent
commit
21b8bf92c6

+ 49 - 6
Assets/BowArrow/Scenes/Entry.unity

@@ -262,7 +262,7 @@ Transform:
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_Children: []
   m_Father: {fileID: 0}
-  m_RootOrder: 4
+  m_RootOrder: 5
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!1 &29910636
 GameObject:
@@ -294,7 +294,7 @@ Transform:
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_Children: []
   m_Father: {fileID: 0}
-  m_RootOrder: 1
+  m_RootOrder: 2
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!81 &29910638
 AudioListener:
@@ -535,7 +535,7 @@ RectTransform:
   m_Children:
   - {fileID: 1693457930}
   m_Father: {fileID: 0}
-  m_RootOrder: 3
+  m_RootOrder: 4
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 0, y: 0}
@@ -646,11 +646,11 @@ Transform:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 1422346461}
   m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
-  m_LocalPosition: {x: -0.057893097, y: 1.1184957, z: -0.16152763}
+  m_LocalPosition: {x: 0, y: 0, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_Children: []
   m_Father: {fileID: 0}
-  m_RootOrder: 0
+  m_RootOrder: 1
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!114 &1422346463
 MonoBehaviour:
@@ -761,7 +761,7 @@ RectTransform:
   - {fileID: 730210589}
   - {fileID: 1288895433}
   m_Father: {fileID: 0}
-  m_RootOrder: 2
+  m_RootOrder: 3
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 0, y: 0}
@@ -864,6 +864,49 @@ MonoBehaviour:
     sprite: {fileID: 21300000, guid: ea55a3c75079cf4429cf9a4866a5ffed, type: 3}
     size: {x: 1000, y: 380}
   resetSize: 1
+--- !u!1 &1842207388
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 1842207389}
+  - component: {fileID: 1842207390}
+  m_Layer: 0
+  m_Name: "AOTAdapter[\u975E\u5E38\u91CD\u8981]"
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!4 &1842207389
+Transform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1842207388}
+  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_Children: []
+  m_Father: {fileID: 0}
+  m_RootOrder: 0
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!114 &1842207390
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1842207388}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 68c1448bae6cec044896a9067bd99768, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
 --- !u!1 &2060474345
 GameObject:
   m_ObjectHideFlags: 0

+ 42 - 0
Assets/BowArrow/Scripts/Bluetooth/New/AOTAdapter.cs

@@ -0,0 +1,42 @@
+using System;
+using System.Collections;
+using UnityEngine;
+using UnityEngine.Scripting;
+using o0.Num;
+using o0.Geometry;
+
+//AOT适配器[#该脚本非常重要不要删除#]
+//该脚本需要挂载在场景中才会生效,只要静态构造函数得以调用就ok了
+[Preserve]
+public class AOTAdapter : MonoBehaviour
+{
+    static AOTAdapter()
+    {
+        //o0.Num泛型类的显式创建
+        Num<Vector<double>>.Plus = (a, b) => a + b;
+        Num<Vector<double>>.Minus = (a, b) => a - b;
+        Num<Vector<double>>.Multiply = (a, b) => a * b;
+        Num<Vector<double>>.Divide = (a, b) => a / b;
+        Num<Vector<double>>.Rate = (a, b) => a * b;
+    }
+
+    //用保存的模块数据片段,测试陀螺仪校准,排查aot编译导致底层函数出错
+    IEnumerator TestCalibrateGyrBy9AxisData() {
+        while (!AimHandler.ins) yield return null;
+        Debug.Log("start-Test9AxisData");
+        AimHandler.ins.CalibrateGyr(true);
+        string dataText = Resources.Load<TextAsset>("test-data").text;
+        int a = 0;
+        foreach (var dataLine in dataText.Split('\n'))
+        {
+            AimHandler.ins.OnDataReceived(ToBytes(dataLine));
+            a++;
+            if (a == 100) AimHandler.ins.CalibrateGyr(false); 
+        }
+        Debug.Log("end-Test9AxisData");
+    }
+
+    byte[] ToBytes(string msg) {
+        return Array.ConvertAll<string, byte>(msg.Split(','), s => byte.Parse(s));
+    }
+}

+ 11 - 0
Assets/BowArrow/Scripts/Bluetooth/New/AOTAdapter.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 68c1448bae6cec044896a9067bd99768
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 8 - 0
Assets/BowArrow/Scripts/Bluetooth/New/Resources.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 97816de044511364997b381319bcdc23
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 158 - 0
Assets/BowArrow/Scripts/Bluetooth/New/Resources/test-data.txt

@@ -0,0 +1,158 @@
+123,66,66,58,51,52,58,50,52,58,50,50,58,55,55,58,56,56,125,10
+123,0,13,0,105,15,96,0,15,255,165,7,173,0,6,255,255,255,247,254,79,252,101,1,47,162,125
+123,0,13,0,113,15,176,0,15,255,165,7,173,0,4,0,0,255,247,254,101,252,118,1,71,114,125
+123,0,13,0,123,15,112,0,18,255,164,7,172,0,4,255,255,255,247,254,101,252,118,1,71,114,125
+123,0,13,0,134,15,176,0,16,255,166,7,172,0,5,0,0,255,247,254,92,252,103,1,62,132,125
+123,0,13,0,143,15,96,0,17,255,164,7,175,0,5,255,255,255,247,254,92,252,103,1,62,132,125
+123,0,13,0,153,15,176,0,18,255,167,7,173,0,5,255,255,255,247,254,82,252,113,1,66,124,125
+123,0,13,0,164,15,112,0,17,255,168,7,173,0,4,255,255,255,248,254,82,252,113,1,66,124,125
+123,0,13,0,173,15,176,0,17,255,168,7,176,0,6,0,0,255,247,254,71,252,95,1,48,160,125
+123,0,13,0,183,15,208,0,14,255,167,7,174,0,6,0,0,255,248,254,71,252,95,1,48,160,125
+123,0,13,0,194,15,48,0,13,255,167,7,173,0,6,0,0,255,248,254,88,252,112,1,41,174,125
+123,0,13,0,203,15,112,0,14,255,165,7,173,0,6,0,1,255,248,254,88,252,112,1,41,174,125
+123,0,13,0,213,15,208,0,17,255,164,7,172,0,5,0,1,255,247,254,85,252,129,1,60,136,125
+123,0,13,0,224,15,96,0,17,255,166,7,173,0,6,0,1,255,246,254,85,252,129,1,60,136,125
+123,0,13,0,243,15,96,0,18,255,166,7,171,0,6,0,0,255,247,254,90,252,95,1,48,160,125
+123,0,13,0,233,15,208,0,18,255,165,7,173,0,6,0,1,255,246,254,90,252,95,1,48,160,125
+123,0,13,0,254,15,160,0,17,255,165,7,173,0,6,0,0,255,246,254,84,252,103,1,59,138,125
+123,0,13,1,17,15,160,0,17,255,161,7,173,0,6,0,0,255,246,254,82,252,103,1,59,138,125
+123,0,13,1,7,15,208,0,18,255,164,7,174,0,6,0,0,255,247,254,84,252,103,1,59,138,125
+123,0,13,1,28,15,128,0,14,255,161,7,171,0,5,0,1,255,246,254,63,252,129,1,46,164,125
+123,0,13,1,37,15,64,0,13,255,162,7,171,0,5,0,1,255,246,254,63,252,129,1,46,164,125
+123,0,13,1,47,15,208,0,12,255,164,7,173,0,4,0,0,255,246,254,80,252,119,1,58,140,125
+123,0,13,1,58,15,160,0,13,255,162,7,173,0,4,0,0,255,246,254,80,252,119,1,58,140,125
+123,0,13,1,67,15,160,0,12,255,166,7,175,0,4,255,255,255,247,254,92,252,108,1,62,132,125
+123,0,13,1,77,15,208,0,14,255,164,7,171,0,5,0,0,255,248,254,92,252,108,1,62,132,125
+123,0,13,1,88,15,96,0,15,255,163,7,170,0,6,255,255,255,248,254,84,252,113,1,49,158,125
+123,0,13,1,97,15,64,0,14,255,167,7,171,0,5,255,254,255,248,254,84,252,113,1,49,158,125
+123,0,13,1,107,15,160,0,14,255,167,7,172,0,4,255,255,255,247,254,74,252,128,1,45,166,125
+123,0,13,1,118,15,160,0,15,255,165,7,169,0,5,0,0,255,248,254,74,252,128,1,45,166,125
+123,0,13,1,127,15,224,0,12,255,164,7,170,0,4,0,0,255,247,254,78,252,95,1,53,150,125
+123,0,13,1,137,15,160,0,13,255,165,7,169,0,3,0,0,255,247,254,78,252,95,1,53,150,125
+123,0,13,1,167,15,160,0,14,255,167,7,172,0,5,255,255,255,247,254,73,252,117,1,70,116,125
+123,0,13,1,148,15,176,0,16,255,166,7,169,0,4,0,0,255,247,254,93,252,107,1,60,136,125
+123,0,13,1,157,15,224,0,17,255,166,7,171,0,5,255,255,255,247,254,93,252,107,1,60,136,125
+123,0,13,1,178,15,112,0,16,255,166,7,173,0,5,0,0,255,247,254,73,252,117,1,70,116,125
+123,0,13,1,197,15,112,0,15,255,167,7,173,0,4,0,0,255,247,254,76,252,114,1,63,130,125
+123,0,13,1,187,15,160,0,15,255,167,7,172,0,5,0,0,255,247,254,76,252,114,1,63,130,125
+123,0,13,1,208,15,128,0,14,255,165,7,171,0,5,255,255,255,247,254,58,252,87,1,48,160,125
+123,0,13,1,217,15,128,0,13,255,163,7,172,0,4,0,0,255,248,254,58,252,87,1,48,160,125
+123,0,13,1,227,15,112,0,12,255,164,7,172,0,5,0,1,255,248,254,92,252,108,1,49,158,125
+123,0,13,1,247,15,160,0,12,255,167,7,172,0,4,0,0,255,246,254,82,252,103,1,59,138,125
+123,0,13,2,1,15,128,0,14,255,165,7,174,0,5,255,255,255,246,254,82,252,103,1,59,138,125
+123,0,13,1,238,15,128,0,12,255,166,7,173,0,5,0,0,255,247,254,92,252,108,1,49,158,125
+123,0,13,2,21,15,64,0,15,255,162,7,174,0,6,0,0,255,247,254,83,252,92,1,46,164,125
+123,0,13,2,12,15,160,0,16,255,163,7,172,0,6,255,255,255,247,254,83,252,92,1,46,164,125
+123,0,13,2,31,15,160,0,16,255,164,7,173,0,5,255,255,255,247,254,72,252,116,1,57,142,125
+123,0,13,2,42,15,96,0,15,255,164,7,173,0,5,0,0,255,248,254,72,252,116,1,57,142,125
+123,0,13,2,51,15,160,0,15,255,167,7,172,0,5,255,255,255,247,254,79,252,108,1,54,148,125
+123,0,13,2,61,15,96,0,14,255,166,7,173,0,5,255,255,255,248,254,79,252,108,1,54,148,125
+123,0,13,2,81,15,128,0,18,255,168,7,171,0,6,255,255,255,246,254,68,252,112,1,56,144,125
+123,0,13,2,72,15,128,0,17,255,165,7,168,0,6,255,255,255,247,254,68,252,112,1,56,144,125
+123,0,13,2,91,15,160,0,17,255,169,7,169,0,6,255,255,255,246,254,92,252,101,1,57,142,125
+123,0,13,2,102,15,224,0,15,255,167,7,172,0,5,255,255,255,247,254,79,252,96,1,57,142,125
+123,0,13,2,111,15,176,0,16,255,169,7,171,0,5,0,0,255,247,254,79,252,96,1,57,142,125
+123,0,13,2,121,15,208,0,15,255,169,7,173,0,4,0,0,255,247,254,80,252,102,1,68,120,125
+123,0,13,2,151,15,128,0,14,255,170,7,173,0,5,255,255,255,248,254,83,252,97,1,41,174,125
+123,0,13,2,132,15,208,0,15,255,167,7,175,0,4,0,0,255,247,254,80,252,102,1,68,120,125
+123,0,13,2,141,15,224,0,14,255,167,7,172,0,4,0,0,255,248,254,83,252,97,1,41,174,125
+123,0,13,2,171,15,112,0,16,255,166,7,174,0,6,0,0,255,247,254,77,252,108,1,54,148,125
+123,0,13,2,162,15,96,0,15,255,168,7,175,0,4,255,255,255,248,254,77,252,108,1,54,148,125
+123,0,13,2,181,15,176,0,14,255,166,7,171,0,5,255,255,255,248,254,101,252,113,1,54,148,125
+123,0,13,2,192,15,160,0,17,255,167,7,172,0,5,0,0,255,247,254,101,252,113,1,54,148,125
+123,0,13,2,201,15,96,0,17,255,166,7,173,0,5,255,255,255,248,254,78,252,122,1,46,164,125
+123,0,13,2,222,15,160,0,20,255,166,7,174,0,6,255,255,255,248,254,101,252,121,1,54,148,125
+123,0,13,2,231,15,160,0,18,255,166,7,174,0,4,255,255,255,248,254,101,252,121,1,54,148,125
+123,0,13,2,241,15,64,0,15,255,165,7,174,0,4,0,1,255,248,254,73,252,119,1,60,136,125
+123,0,13,2,211,15,64,0,18,255,164,7,172,0,5,0,0,255,248,254,78,252,122,1,46,164,125
+123,0,13,2,252,15,160,0,17,255,165,7,172,0,5,0,2,255,248,254,73,252,119,1,60,136,125
+123,0,13,3,5,15,96,0,17,255,164,7,172,0,6,0,0,255,249,254,74,252,96,1,66,124,125
+123,0,13,3,15,15,128,0,17,255,163,7,176,0,6,0,1,255,248,254,74,252,96,1,66,124,125
+123,0,13,3,35,15,112,0,16,255,165,7,172,0,5,0,1,255,248,254,101,252,113,1,62,132,125
+123,0,13,3,26,15,208,0,17,255,164,7,174,0,6,0,0,255,247,254,101,252,113,1,62,132,125
+123,0,13,3,45,15,160,0,15,255,165,7,172,0,4,0,0,255,248,254,90,252,124,1,43,170,125
+123,0,13,3,56,15,96,0,17,255,166,7,173,0,4,0,0,255,247,254,90,252,124,1,43,170,125
+123,0,13,3,75,15,208,0,16,255,165,7,172,0,5,0,1,255,248,254,87,252,101,1,76,104,125
+123,0,13,3,65,15,160,0,18,255,164,7,174,0,5,0,0,255,247,254,87,252,101,1,76,104,125
+123,0,13,3,86,15,208,0,14,255,164,7,172,0,6,0,0,255,249,254,69,252,103,1,42,172,125
+123,0,13,3,95,15,208,0,12,255,164,7,172,0,6,0,0,255,248,254,69,252,103,1,42,172,125
+123,0,13,3,105,15,96,0,15,255,165,7,173,0,4,0,1,255,248,254,72,252,111,1,52,152,125
+123,0,13,3,116,15,160,0,14,255,166,7,175,0,4,0,0,255,247,254,72,252,111,1,52,152,125
+123,0,13,3,135,15,176,0,17,255,165,7,172,0,4,0,0,255,248,254,78,252,109,1,58,140,125
+123,0,13,3,125,15,208,0,17,255,165,7,172,0,3,0,0,255,247,254,78,252,109,1,58,140,125
+123,0,13,3,146,15,96,0,15,255,166,7,172,0,6,0,0,255,248,254,85,252,124,1,68,120,125
+123,0,13,3,165,15,112,0,14,255,164,7,171,0,6,0,1,255,247,254,92,252,96,1,54,148,125
+123,0,13,3,155,15,160,0,14,255,163,7,170,0,6,0,0,255,247,254,85,252,124,1,68,120,125
+123,0,13,3,175,15,160,0,14,255,166,7,171,0,6,0,0,255,247,254,92,252,96,1,54,148,125
+123,0,13,3,185,15,112,0,14,255,165,7,171,0,6,0,0,255,248,254,92,252,96,1,54,148,125
+123,0,13,3,195,15,208,0,14,255,167,7,170,0,5,0,0,255,247,254,101,252,106,1,59,138,125
+123,0,13,3,215,15,112,0,14,255,166,7,172,0,5,255,255,255,248,254,78,252,105,1,53,150,125
+123,0,13,3,225,15,160,0,16,255,166,7,176,0,4,255,255,255,248,254,78,252,105,1,53,150,125
+123,0,14,0,5,15,112,0,17,255,167,7,174,0,4,0,0,255,247,254,93,252,114,1,56,144,125
+123,0,14,0,34,15,160,0,17,255,168,7,177,0,5,255,255,255,249,254,80,252,97,1,43,170,125
+123,0,14,0,23,15,128,0,18,255,167,7,172,0,4,255,255,255,247,254,80,252,97,1,43,170,125
+123,0,14,0,53,15,160,0,14,255,165,7,171,0,6,0,0,255,247,254,95,252,102,1,60,136,125
+123,0,14,0,43,15,96,0,14,255,166,7,177,0,6,255,255,255,248,254,95,252,102,1,60,136,125
+123,0,14,0,13,15,96,0,16,255,167,7,173,0,5,255,255,255,247,254,93,252,114,1,56,144,125
+123,0,14,0,65,15,96,0,14,255,167,7,172,0,6,255,255,255,246,254,104,252,118,1,47,162,125
+123,0,14,0,73,15,128,0,14,255,163,7,170,0,6,0,0,255,247,254,104,252,118,1,47,162,125
+123,0,14,0,83,15,160,0,15,255,162,7,173,0,5,0,0,255,246,254,79,252,116,1,59,138,125
+123,0,14,0,94,15,176,0,15,255,164,7,172,0,5,0,1,255,247,254,79,252,116,1,59,138,125
+123,0,14,0,103,15,96,0,13,255,163,7,174,0,5,0,0,255,246,254,69,252,106,1,54,148,125
+123,0,14,0,113,15,96,0,15,255,165,7,174,0,4,255,255,255,247,254,69,252,106,1,54,148,125
+123,0,15,0,73,15,112,0,18,255,166,7,174,0,4,0,0,255,248,254,84,252,116,1,59,138,125
+123,0,15,0,93,15,128,0,17,255,166,7,171,0,5,0,0,255,247,254,72,252,103,1,47,162,125
+123,0,15,0,103,15,112,0,16,255,166,7,174,0,5,255,255,255,246,254,72,252,103,1,47,162,125
+123,0,15,0,84,15,160,0,19,255,166,7,173,0,4,255,255,255,247,254,84,252,116,1,59,138,125
+123,0,14,0,124,15,160,0,16,255,166,7,171,0,5,0,0,255,248,254,84,252,116,1,54,148,125
+123,0,14,0,133,15,96,0,14,255,167,7,171,0,5,255,255,255,248,254,84,252,116,1,54,148,125
+123,0,14,0,143,15,96,0,13,255,165,7,172,0,5,0,0,255,247,254,87,252,91,1,64,128,125
+123,0,14,0,173,15,160,0,16,255,165,7,172,0,5,0,0,255,248,254,99,252,111,1,62,132,125
+123,0,14,0,154,15,176,0,14,255,165,7,177,0,4,255,255,255,247,254,87,252,91,1,64,128,125
+123,0,14,0,163,15,48,0,17,255,167,7,176,0,4,0,0,255,247,254,99,252,111,1,62,132,125
+123,0,14,0,184,15,112,0,16,255,163,7,171,0,5,0,0,255,248,254,74,252,113,1,74,108,125
+123,0,14,0,193,15,128,0,16,255,165,7,172,0,5,0,0,255,247,254,74,252,113,1,74,108,125
+123,0,14,0,203,15,208,0,17,255,164,7,172,0,5,0,0,255,247,254,84,252,118,1,47,162,125
+123,0,14,0,214,15,128,0,17,255,164,7,173,0,6,0,0,255,247,254,84,252,118,1,47,162,125
+123,0,14,0,223,15,160,0,18,255,166,7,172,0,5,0,0,255,247,254,77,252,96,1,64,128,125
+123,0,14,0,233,15,96,0,17,255,167,7,172,0,5,0,0,255,247,254,77,252,96,1,64,128,125
+123,0,14,0,253,15,96,0,13,255,165,7,168,0,5,0,1,255,247,254,89,252,103,1,62,132,125
+123,0,14,0,244,15,128,0,15,255,166,7,170,0,5,0,0,255,246,254,89,252,103,1,62,132,125
+123,0,14,1,7,15,128,0,16,255,165,7,171,0,5,0,2,255,247,254,87,252,118,1,49,158,125
+123,0,14,1,18,15,224,0,19,255,165,7,174,0,6,0,0,255,245,254,74,252,123,1,45,166,125
+123,0,14,1,27,15,160,0,19,255,165,7,174,0,5,0,0,255,247,254,74,252,123,1,45,166,125
+123,0,14,1,37,15,128,0,17,255,164,7,175,0,6,255,255,255,247,254,74,252,123,1,45,166,125
+123,0,14,1,48,15,48,0,17,255,166,7,175,0,6,255,255,255,246,254,74,252,123,1,45,166,125
+123,0,14,1,57,15,160,0,14,255,165,7,178,0,6,0,0,255,245,254,92,252,116,1,64,128,125
+123,0,14,1,87,15,224,0,15,255,163,7,171,0,5,0,0,255,246,254,87,252,123,1,57,142,125
+123,0,14,1,78,15,160,0,18,255,162,7,175,0,5,0,0,255,248,254,87,252,123,1,57,142,125
+123,0,14,1,97,15,48,0,14,255,164,7,173,0,5,255,255,255,247,254,83,252,112,1,53,150,125
+123,0,14,1,67,15,128,0,16,255,164,7,175,0,6,0,0,255,247,254,92,252,116,1,64,128,125
+123,0,14,1,127,15,224,0,16,255,166,7,168,0,4,255,255,255,248,254,72,252,118,1,62,132,125
+123,0,14,1,108,15,96,0,17,255,165,7,172,0,5,0,0,255,247,254,83,252,112,1,53,150,125
+123,0,14,1,117,15,160,0,17,255,164,7,172,0,4,255,255,255,248,254,72,252,118,1,62,132,125
+123,0,14,1,138,15,128,0,14,255,166,7,167,0,4,255,255,255,246,254,83,252,122,1,70,116,125
+123,0,14,1,147,15,112,0,13,255,167,7,167,0,4,255,255,255,247,254,83,252,122,1,70,116,125
+123,0,14,1,157,15,208,0,12,255,167,7,169,0,5,0,0,255,247,254,74,252,101,1,57,142,125
+123,0,14,1,168,15,160,0,11,255,165,7,171,0,5,0,0,255,247,254,74,252,101,1,57,142,125
+123,0,14,1,177,15,176,0,14,255,166,7,170,0,6,0,0,255,247,254,83,252,109,1,56,144,125
+123,0,14,1,187,15,160,0,15,255,164,7,172,0,5,255,255,255,247,254,83,252,109,1,56,144,125
+123,0,14,1,207,15,160,0,14,255,163,7,171,0,5,0,0,255,248,254,69,252,98,1,62,132,125
+123,0,14,1,198,15,208,0,16,255,161,7,173,0,5,0,1,255,247,254,69,252,98,1,62,132,125
+123,0,14,1,217,15,176,0,14,255,164,7,171,0,6,255,255,255,249,254,83,252,102,1,48,160,125
+123,0,14,1,237,15,160,0,17,255,163,7,171,0,6,255,255,255,249,254,78,252,102,1,46,164,125
+123,0,14,1,228,15,160,0,17,255,165,7,171,0,6,255,255,255,248,254,83,252,102,1,48,160,125
+123,0,14,1,247,15,96,0,17,255,164,7,171,0,6,0,0,255,249,254,78,252,102,1,46,164,125
+123,0,14,2,2,15,96,0,18,255,163,7,172,0,6,0,0,255,248,254,87,252,89,1,45,166,125
+123,0,14,2,11,15,48,0,15,255,165,7,173,0,6,0,0,255,248,254,87,252,89,1,45,166,125
+123,0,14,2,21,15,128,0,14,255,163,7,172,0,5,0,0,255,247,254,78,252,107,1,65,126,125
+123,0,14,2,32,15,64,0,15,255,163,7,174,0,4,0,0,255,248,254,78,252,107,1,65,126,125
+123,0,14,2,41,15,160,0,13,255,164,7,169,0,5,0,0,255,248,254,92,252,101,1,71,114,125
+123,0,14,2,51,15,96,0,14,255,165,7,169,0,4,0,1,255,248,254,92,252,101,1,71,114,125
+123,0,14,2,62,15,208,0,13,255,165,7,170,0,5,0,0,255,249,254,87,252,111,1,59,138,125
+123,0,14,2,81,15,48,0,16,255,165,7,173,0,5,0,0,255,247,254,87,252,106,1,49,158,125
+123,0,14,2,71,15,208,0,17,255,163,7,172,0,4,255,255,255,248,254,87,252,111,1,59,138,125
+123,0,14,2,101,15,160,0,13,255,163,7,174,0,4,0,0,255,247,254,87,252,106,1,49,158,125
+123,0,14,2,92,15,160,0,15,255,165,7,174,0,5,0,0,255,247,254,87,252,106,1,49,158,125
+123,0,14,2,111,15,128,0,13,255,163,7,173,0,5,0,1,255,248,254,87,252,106,1,49,158,125
+123,0,14,2,122,15,176,0,13,255,164,7,172,0,4,0,0,255,247,254,87,252,106,1,49,158,125

+ 7 - 0
Assets/BowArrow/Scripts/Bluetooth/New/Resources/test-data.txt.meta

@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: ed6edc96f646be54e8b92bae6015c8a3
+TextScriptImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 105 - 0
Assets/ThirdAssets/JCUnityLib/AotHelper.cs

@@ -0,0 +1,105 @@
+#region License
+// The MIT License (MIT)
+//
+// Copyright (c) 2016 SaladLab
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+#endregion
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using Newtonsoft.Json.Serialization;
+
+namespace Newtonsoft.Json.Utilities
+{
+    /// <summary>
+    /// 
+    /// </summary>
+    public static class AotHelper
+    {
+        /// <summary>
+        /// Don't run action but let a compiler detect the code in action as an executable block.
+        /// </summary>
+        public static void Ensure(Action action)
+        {
+            if (IsFalse())
+            {
+                try
+                {
+                    action();
+                }
+                catch (Exception e)
+                {
+                    throw new InvalidOperationException("", e);
+                }
+            }
+        }
+
+        /// <summary>
+        /// Ensure(() => new T());
+        /// </summary>
+        public static void EnsureType<T>() where T : new()
+        {
+            Ensure(() => new T());
+        }
+
+        /// <summary>
+        /// Ensure generic list type can be (de)deserializable on AOT environment.
+        /// </summary>
+        /// <typeparam name="T">The type of elements in the list</typeparam>
+        public static void EnsureList<T>()
+        {
+            Ensure(() =>
+            {
+                var a = new List<T>();
+                var b = new HashSet<T>();
+                // var c = new CollectionWrapper<T>((IList)a);
+                // var d = new CollectionWrapper<T>((ICollection<T>)a);
+            });
+        }
+
+        /// <summary>
+        /// Ensure generic dictionary type can be (de)deserializable on AOT environment.
+        /// </summary>
+        /// <typeparam name="TKey">The type of the keys in the dictionary.</typeparam>
+        /// <typeparam name="TValue">The type of the values in the dictionary.</typeparam>
+        public static void EnsureDictionary<TKey, TValue>()
+        {
+            Ensure(() =>
+            {
+                var a = new Dictionary<TKey, TValue>();
+                // var b = new DictionaryWrapper<TKey, TValue>((IDictionary)null);
+                // var c = new DictionaryWrapper<TKey, TValue>((IDictionary<TKey, TValue>)null);
+                // var d = new DefaultContractResolver.EnumerableDictionaryWrapper<TKey, TValue>((IDictionary<TKey, TValue>)null);
+            });
+        }
+
+        private static bool s_alwaysFalse = DateTime.UtcNow.Year < 0;
+
+        /// <summary>
+        /// Always return false but compiler doesn't know it.
+        /// </summary>
+        /// <returns>False</returns>
+        public static bool IsFalse()
+        {
+            return s_alwaysFalse;
+        }
+    }
+}

+ 11 - 0
Assets/ThirdAssets/JCUnityLib/AotHelper.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 15d96fe36606743428b16289008d7194
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: