/// <summary> /// Awake this instance. /// </summary> private void Awake() { AndroidHelper.RegisterPauseEvent(_androidOnPause); AndroidHelper.RegisterResumeEvent(_androidOnResume); AndroidHelper.RegisterOnActivityResultEvent(_androidOnActivityResult); if (m_enableMotionTracking) { m_poseListener = new PoseListener(); } if (m_enableDepth) { m_depthListener = new DepthListener(); } if (m_enableUXLibrary) { m_tangoEventListener = new TangoEventListener(); } if (m_enableVideoOverlay) { int yTextureWidth = 0; int yTextureHeight = 0; int uvTextureWidth = 0; int uvTextureHeight = 0; m_yuvTexture = new YUVTexture(yTextureWidth, yTextureHeight, uvTextureWidth, uvTextureHeight, TextureFormat.RGBA32, false); m_videoOverlayListener = new VideoOverlayListener(); } }
/// <summary> /// Awake this instance. /// </summary> private void Awake() { AndroidHelper.RegisterPauseEvent(_androidOnPause); AndroidHelper.RegisterResumeEvent(_androidOnResume); AndroidHelper.RegisterOnActivityResultEvent(_androidOnActivityResult); if (m_enableMotionTracking) { m_poseListener = new PoseListener(); } if (m_enableDepth) { m_depthListener = new DepthListener(); } if (m_enableUXLibrary) { m_tangoEventListener = new TangoEventListener(); } if (m_enableVideoOverlay) { m_videoOverlayTexture = new Texture2D(Screen.width, Screen.height, TextureFormat.RGBA32, false); m_videoOverlayTexture.Apply(); m_videoOverlayListener = new VideoOverlayListener(); } }
/// <summary> /// Awake this instance. /// </summary> private void Awake() { AndroidHelper.RegisterPauseEvent(_androidOnPause); AndroidHelper.RegisterResumeEvent(_androidOnResume); AndroidHelper.RegisterOnActivityResultEvent(_androidOnActivityResult); // Setup listeners. m_tangoEventListener = new TangoEventListener(); m_areaDescriptionEventListener = new AreaDescriptionEventListener(); if (m_enableCloudADF) { m_tangoCloudEventListener = new TangoCloudEventListener(); } if (m_enableMotionTracking) { m_poseListener = new PoseListener(); } if (m_enableDepth) { m_depthListener = new DepthListener(); } if (m_enableVideoOverlay) { int yTextureWidth = 0; int yTextureHeight = 0; int uvTextureWidth = 0; int uvTextureHeight = 0; m_yuvTexture = new YUVTexture(yTextureWidth, yTextureHeight, uvTextureWidth, uvTextureHeight, TextureFormat.RGBA32, false); m_videoOverlayListener = new VideoOverlayListener(); } // Setup configs. m_tangoConfig = new TangoConfig(TangoEnums.TangoConfigType.TANGO_CONFIG_DEFAULT); m_tangoRuntimeConfig = new TangoConfig(TangoEnums.TangoConfigType.TANGO_CONFIG_RUNTIME); }
/// <summary> /// Awake this instance. /// </summary> private void Awake() { AndroidHelper.RegisterPauseEvent(_androidOnPause); AndroidHelper.RegisterResumeEvent(_androidOnResume); AndroidHelper.RegisterOnActivityResultEvent(_androidOnActivityResult); if(m_enableMotionTracking) { m_poseListener = new PoseListener(); } if(m_enableDepth) { m_depthListener = new DepthListener(); } if(m_enableUXLibrary) { m_tangoEventListener = new TangoEventListener(); } if(m_enableVideoOverlay) { m_videoOverlayTexture = new Texture2D(Screen.width, Screen.height, TextureFormat.RGBA32, false); m_videoOverlayTexture.Apply(); m_videoOverlayListener = new VideoOverlayListener(); } }
/// <summary> /// Awake this instance. /// </summary> private void Awake() { AndroidHelper.RegisterPauseEvent(_androidOnPause); AndroidHelper.RegisterResumeEvent(_androidOnResume); AndroidHelper.RegisterOnActivityResultEvent(_androidOnActivityResult); AndroidHelper.RegisterOnScreenOrientationChangedEvent(_androidOnScreenOrientationChanged); // Setup listeners. m_tangoEventListener = new TangoEventListener(); m_areaDescriptionEventListener = new AreaDescriptionEventListener(); if (m_enableCloudADF) { m_tangoCloudEventListener = new TangoCloudEventListener(); } if (m_enableMotionTracking) { m_poseListener = new PoseListener(); } if (m_enableDepth) { m_depthListener = new DepthListener(); } if (m_enableVideoOverlay) { int yTextureWidth = 0; int yTextureHeight = 0; int uvTextureWidth = 0; int uvTextureHeight = 0; m_yuvTexture = new YUVTexture(yTextureWidth, yTextureHeight, uvTextureWidth, uvTextureHeight, TextureFormat.RGBA32, false); m_videoOverlayListener = new VideoOverlayListener(); } if (m_enable3DReconstruction) { m_tango3DReconstruction = new Tango3DReconstruction(m_3drResolutionMeters, m_3drGenerateColor, m_3drSpaceClearing); m_tango3DReconstruction.m_useAreaDescriptionPose = m_3drUseAreaDescriptionPose; m_tango3DReconstruction.m_sendColorToUpdate = m_3drGenerateColor; } // Setup configs. m_tangoConfig = new TangoConfig(TangoEnums.TangoConfigType.TANGO_CONFIG_DEFAULT); m_tangoRuntimeConfig = new TangoConfig(TangoEnums.TangoConfigType.TANGO_CONFIG_RUNTIME); TangoSupport.UpdateCurrentRotationIndex(); }