コード例 #1
0
 void Awake()
 {
     if (!init)
     {
         Instance = this;
         DontDestroyOnLoad(this.gameObject);
         init = true;
         BluetoothHandleDevice.Instance.init();
         ShadowSystem.Head   = Head;
         ShadowSystem.Camera = Camera;
     }
     else
     {
         Destroy(this.gameObject);
         return;
     }
 }
コード例 #2
0
 void Awake()
 {
     if (!init)
     {
         Instance = this;
         DontDestroyOnLoad(this.gameObject);
         init = true;
         ShadowSystem.Head   = Head;
         ShadowSystem.Camera = Camera;
         try{
             BluetoothHandleDevice.Instance.init();
         }
         catch {
             Debug.Log("蓝牙手柄初始化出错");
         }
     }
     else
     {
         Destroy(this.gameObject);
         return;
     }
 }