Log in or register to post comments

Pausing Unity app and Vuforia lifecycle consequences

August 6, 2020 - 5:05am #1

I'm doing the following for the user experience in my app:

* User clicks an AR target

* I block the orientation into landscape

* I launch a fullscreen video with the native player (Handheld.PlayFullScreenMovie.)

* User quits video

* I force the rotation back to portrait mode


Currently, I am waiting about 5 seconds before forcing the rotation back to portrait because if I do it to quickly the camera screen goes black.

I think this is a problem with how vuforia handles Pausing-Unpausing with Unity.

I'm looking for the right way to check if the Vuforia is functioning with the camera and all to make the switch to landscape at the right moment to avoid this error. I have tried

This is what I have tried, notice the 5 second wait is what is preventing the crash

Screen.autorotateToLandscapeLeft = true;

        Screen.autorotateToLandscapeRight = true;

        Screen.autorotateToPortraitUpsideDown = false;

        Screen.autorotateToPortrait = false;

        Screen.orientation = ScreenOrientation.Landscape;

        yield return null;

        yield return null;

        Handheld.PlayFullScreenMovie("parreno.mp4", Color.black, FullScreenMovieControlMode.Full);

        yield return new WaitForEndOfFrame();

        yield return new WaitForEndOfFrame();


        while (!VuforiaRenderer.Instance.IsVideoBackgroundInfoAvailable()) {

            yield return new WaitForSeconds(0.1f);


        yield return new WaitForSeconds(5f);



Pausing Unity app and Vuforia lifecycle consequences

August 10, 2020 - 4:51am #2


From the code it is not clear, how do you pause the application/Vuforia. Could you please also add this info?

Also could you please add the error that you see in the log when the screen is black?

Thank you.

Vuforia Engine Support

Log in or register to post comments