public static RegisterOnActivityResultEvent ( OnActivityResultEventHandler onActivityResult ) : void | ||
onActivityResult | OnActivityResultEventHandler | On activity result. |
Résultat | void |
/// <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> /// Setup getting Area Description callbacks from onActivityResult. /// </summary> internal static void SetCallback() { if (m_isCallbackSet) { Debug.Log("AreaDescriptionEventListener.SetCallback() called when callback is already set."); return; } Debug.Log("AreaDescriptionEventListener.SetCallback()"); m_isCallbackSet = true; AndroidHelper.RegisterOnActivityResultEvent(_OnActivityResult); }
/// <summary> /// Awake this instance. /// </summary> private void Awake() { AndroidHelper.RegisterPauseEvent(_androidOnPause); AndroidHelper.RegisterResumeEvent(_androidOnResume); AndroidHelper.RegisterOnActivityResultEvent(_androidOnActivityResult); }
/// <summary> /// AreaDescriptionEventListener constructor. /// /// The activity result callback is registered when the listener is initialized. /// </summary> public AreaDescriptionEventListener() { AndroidHelper.RegisterOnActivityResultEvent(_androidOnActivityResult); }
public void RegisterOnActivityResultEvent(OnActivityResultEventHandler handler) { AndroidHelper.RegisterOnActivityResultEvent(handler); }