public static RegisterPauseEvent ( OnPauseEventHandler onPause ) : void | ||
onPause | OnPauseEventHandler | On pause. |
리턴 | 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(); } }
void Start() { // Doesn't work (count increments but log won't show up). // Invokes when: B', C'. AndroidHelper.RegisterPauseEvent(() => { Debug.Log("AndroidHelper.PauseEvent: " + count++); }); // Doesn't work (count increments but log won't show up). // Invokes when: B", C". AndroidHelper.RegisterResumeEvent(() => { Debug.Log("AndroidHelper.ResumeEvent: " + count++); }); }
/// <summary> /// Awake this instance. /// </summary> private void Awake() { AndroidHelper.RegisterPauseEvent(_androidOnPause); AndroidHelper.RegisterResumeEvent(_androidOnResume); AndroidHelper.RegisterOnActivityResultEvent(_androidOnActivityResult); }
public void RegisterPauseEvent(OnPauseEventHandler handler) { AndroidHelper.RegisterPauseEvent(handler); }