// Use this for initialization void Start() { Debug.Log("Camera PreView Texture [" + PreTextureWidth + "," + PreTextureHeight + "]"); holoeverService = NxrViewer.Instance.GetHoloeverService(); if (holoeverService != null) { cameraPreviewHelper = holoeverService.InitCameraPreviewHelper(); } material = GetComponent <Renderer>().material; defaultTexture = material.mainTexture; }
// Use this for initialization void Start() { Debug.Log("Camera PreView Texture [" + PreTextureWidth + "," + PreTextureHeight + "]"); holoeverService = NxrViewer.Instance.GetHoloeverService(); if (holoeverService != null) { cameraPreviewHelper = holoeverService.InitCameraPreviewHelper(); } Renderer renderer = GetComponent <Renderer>(); material = renderer == null ? null : renderer.material; defaultTexture = material != null ? material.mainTexture : null; #if UNITY_ANDROID InitTexture(); #endif }
// Use this for initialization void Start() { textMesh = GetComponent <TextMesh>(); if (NxrViewer.Instance.ShowFPS) { mHoloeverService = NxrViewer.Instance.GetHoloeverService(); if (mHoloeverService != null) { mHoloeverService.SetEnableFPS(true); } } else { Debug.Log("Display FPS is disabled."); } Debug.Log("TrackerPosition=" + NxrViewer.Instance.TrackerPosition); }
// Use this for initialization void Start() { holoeverService = NxrViewer.Instance.GetHoloeverService(); mTransform = gameObject.transform; origin = GameObject.Find("MarkerRoot"); // Polaroid DTR bool dtrMode = NxrGlobal.supportDtr && NxrGlobal.distortionEnabled; if (dtrMode) { NxrViewer.Instance.SwitchControllerMode(false); } NxrGlobal.isMarkerVisible = false; if (holoeverService != null && AutoStartMarkerRecognize) { holoeverService.StartMarkerRecognize(); } cameraPoseMat = new Matrix4x4(); }
public override void Init() { // Start will send a log event, so SetUnityVersion first. byte[] version = System.Text.Encoding.UTF8.GetBytes(Application.unityVersion); if (NxrViewer.USE_DTR) { if (!NxrGlobal.nvrStarted) { if (holoeverVRServiceId == 0) { // 初始化1次service holoeverVRServiceId = CreateHoloeverVRService(); } _NVR_InitAPIs(NxrGlobal.useNvrSo); _NVR_SetUnityVersion(version, version.Length); _NVR_Start(holoeverVRServiceId); SetDisplayQuality((int)NxrViewer.Instance.TextureQuality); SetMultiThreadedRendering(SystemInfo.graphicsMultiThreaded); Debug.LogError("graphicsMultiThreaded=" + SystemInfo.graphicsMultiThreaded); // if (NxrGlobal.soVersion >= 361) { ColorSpace colorSpace = QualitySettings.activeColorSpace; if (colorSpace == ColorSpace.Gamma) { Debug.Log("Color Space - Gamma"); SetColorspaceType(0); } else if (colorSpace == ColorSpace.Linear) { Debug.Log("Color Space - Linear"); SetColorspaceType(1); } } else { Debug.LogError("System Api Not Support ColorSpace!!!"); } if (NxrGlobal.soVersion >= 365) { Debug.Log("Controller Support Mode - " + NxrViewer.Instance.controllerSupportMode.ToString()); SetControllerSupportMode(NxrViewer.Instance.controllerSupportMode); } NxrGlobal.nvrStarted = true; // 初始化服务 HoloeverService holoeverService = new HoloeverService(); holoeverService.Init(); NxrGlobal.holoeverService = holoeverService; // NxrSDKApi.Instance.IsSptEyeLocalRp = IsSptEyeLocalRotPos(); if (NxrSDKApi.Instance.IsSptEyeLocalRp) { _NVR_GetEyeLocalRotPos(NxrSDKApi.Instance.LeftEyeLocalRotation, NxrSDKApi.Instance.LeftEyeLocalPosition, NxrSDKApi.Instance.RightEyeLocalRotation, NxrSDKApi.Instance.RightEyeLocalPosition); } } } Debug.Log("NxrDevice->Init.isSptEyeLocalRp=" + NxrSDKApi.Instance.IsSptEyeLocalRp); }