private void InitNativeController() { m_NativeController = new NativeController(); if (m_NativeController.Init()) { Inited = true; TXRDebugger.Log("TXRControllerProvider Init Succeed"); } else { m_NativeController = null; TXRDebugger.LogError("TXRControllerProvider Init Failed !!"); } #if !UNITY_EDITOR Debug.Log("[TXRInput] version:" + GetVersion(0)); #endif m_NeedInit = false; }
public void CreateSession(TXRSessionBehaviour session) { if (IsInitialized || null == session) { return; } if (null != TXRSessionBehaviour) { TXRDebugger.LogError("Multiple SessionBehaviour components cannot exist in the scene. " + "Destroying the newest."); GameObject.DestroyImmediate(session.gameObject); return; } SessionStatus = TXRSessionState.CREATED; TXRSessionBehaviour = session; TXRHMDPoseTracker = session.GetComponent <TXRHMDPoseTracker>(); // So far, we only have 3DoF Tracking SetTrackingMode(TXRHMDPoseTracker.TrackingType.TRACKINGTYPE_3DOF); }