Example #1
0
 public void Update()
 {
     if (SurfaceUtilities.HasSurfaceBeenRecreated())
     {
         this.InitializeSurface();
     }
 }
Example #2
0
        /// <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++;
        }
Example #3
0
 /// <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();
         }
     }
 }
Example #4
0
        /// <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);
                }
            }
        }