/// <summary> /// Initializes Vuforia; called from Start /// </summary> public VuforiaUnity.InitError Start(string licenseKey) { int errorCode = initVuforiaWSA(licenseKey); if (errorCode >= 0) { InitializeSurface(); #if ENABLE_HOLOLENS_MODULE_API // This determines if we are starting on a holographic device if (UnityEngine.VR.VRSettings.loadedDeviceName.Equals(UNITY_HOLOLENS_IDENTIFIER) && UnityEngine.VR.VRDevice.isPresent) { // set the focus point setter implementation VuforiaUnity.SetHoloLensApiAbstraction(new HoloLensApiImplementation()); Debug.Log("Detected Holographic Device"); if (!VuforiaUnity.SetHoloLensWorldCoordinateSystem(WorldManager.GetNativeISpatialCoordinateSystemPtr())) { return(VuforiaUnity.InitError.INIT_ERROR); } } #endif } return((VuforiaUnity.InitError)errorCode); }
/// <summary> /// Initializes Vuforia /// </summary> public VuforiaUnity.InitError InitializeVuforia(string licenseKey) { int errorCode = initVuforiaWSA(licenseKey); if (errorCode >= 0) { InitializeSurface(); #if HOLOLENS_API_AVAILABLE // This determines if we are starting on a holographic device if (UnityEngine.XR.XRSettings.loadedDeviceName.Equals(UNITY_HOLOLENS_IDENTIFIER) && UnityEngine.XR.XRDevice.isPresent) { // set the focus point setter implementation VuforiaUnity.SetHoloLensApiAbstraction(new HoloLensApiImplementation()); Debug.Log("Detected Holographic Device"); } #endif } return((VuforiaUnity.InitError)errorCode); }