예제 #1
0
 public override void Init()
 {
     Input.gyro.enabled = true;
     // Debug.Log("RemoteDebug_" + NxrViewer.Instance.RemoteDebug);
     if (NxrViewer.Instance.RemoteDebug)
     {
         NxrViewer.Instance.InitialRecenter = false;
         NibiruEmulatorManager nibiruEmulatorManager = NibiruEmulatorManager.Instance;
         nibiruEmulatorManager.OnConfigDataEvent         += ConfigDataLoaded;
         nibiruEmulatorManager.OnHmdPoseDataEvent        += HmdPoseDataEvent;
         nibiruEmulatorManager.OnHmdStatusEvent          += HmdStatusEvent;
         nibiruEmulatorManager.OnControllerPoseDataEvent += ControllerPoseDataEvent;
     }
 }
        public void Init(NibiruEmulatorManager remote)
        {
            TCP_HEAD_BYTES = IntToBytes(TCP_HEAD_TAG);

            phoneRemote = remote;

            clientInfoData                       = new ClientInfoData();
            clientInfoData.type                  = (int)RD_MESSAGE.RD_MESSAGE_CLIENT_INFO;
            clientInfoData.clientVersion         = CLIENT_VERSION;
            clientInfoData.enableControllerDebug = NxrViewer.Instance.RemoteController ? (byte)1 : (byte)0;
            // Debug.Log("---" + ClientInfoData.Size);

            phoneEventThread = new Thread(phoneEventSocketLoop);
            phoneEventThread.Start();
        }