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; } }
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; } }