public void Update() { if (SurfaceUtilities.HasSurfaceBeenRecreated()) { this.InitializeSurface(); } }
/// <summary> /// Called from Update, checks for various life cycle events that need to be forwarded /// to QCAR, e.g. orientation changes /// </summary> public void Update() { if (SurfaceUtilities.HasSurfaceBeenRecreated()) { InitializeSurface(); } else { // if Unity reports that the orientation has changed, reset the member variable // - this will trigger a check in Java for a few frames... if (Screen.orientation != mScreenOrientation) { ResetUnityScreenOrientation(); } CheckOrientation(); if (mScreenWidth != Screen.width || mScreenHeight != Screen.height) { mScreenWidth = Screen.width; mScreenHeight = Screen.height; SurfaceUtilities.OnSurfaceChanged(mScreenWidth, mScreenHeight); } } mFramesSinceLastOrientationReset++; }
/// <summary> /// Called from Update, checks for various life cycle events that need to be forwarded /// to Vuforia, e.g. orientation changes /// </summary> public void Update() { if (SurfaceUtilities.HasSurfaceBeenRecreated()) { InitializeSurface(); } else { // if Unity reports that the orientation has changed, set it correctly in native if (Screen.orientation != mScreenOrientation) { SetUnityScreenOrientation(); } } }
/// <summary> /// Called from Update, checks for various life cycle events that need to be forwarded /// to Vuforia, e.g. orientation changes /// </summary> public void Update() { if (SurfaceUtilities.HasSurfaceBeenRecreated()) { InitializeSurface(); } else { // if Unity reports that the orientation has changed, reset the member variable // - this will trigger a check in Java for a few frames... if (Screen.orientation != mScreenOrientation) { ResetUnityScreenOrientation(); } CheckOrientation(); } mFramesSinceLastOrientationReset++; }
/// <summary> /// Called from Update, checks for various life cycle events that need to be forwarded /// to QCAR, e.g. orientation changes /// </summary> public void Update() { if (SurfaceUtilities.HasSurfaceBeenRecreated()) { InitializeSurface(); } else { // if Unity reports that the orientation has changed, set it correctly in native if (Screen.orientation != mScreenOrientation) { SetUnityScreenOrientation(); } if (mScreenWidth != Screen.width || mScreenHeight != Screen.height) { mScreenWidth = Screen.width; mScreenHeight = Screen.height; SurfaceUtilities.OnSurfaceChanged(mScreenWidth, mScreenHeight); } } }