By Ihno
on Tue, 11/25/2014 - 13:36
Hi guys,
I'm trying to set my screen orientation while changing the scene.
Basically the only thing I am doing is:
1. switch scene
2. on start() change the screen orientation
The problem is that either the camera screen stays black or the tracking won't work anymore.
My default screen orientation is set to auto rotation with all options included. When set to landscape, my screen stays black.
So far I've only tested it on an android device.
When I switch the scene I let my ARCamera stay alive.
Is there a different way to change the orientation on runtime?
Thanks
Change screen orientation on scene change
You might have to disable the QCARBehavior component when leaving a scene and re-enabling it when entering the new scene; you can retrieve the QCARBehaviour component from the ARCamera object, using GetComponent<QCARBehaviour>().