Log in or register to post comments

Autorotation Problem with iOS APP Native, Black Screen

February 13, 2014 - 7:10am #1

Hi everyone,

 I have a problem when I enable autorotation in my app... I have a unity app with iOS native part, the rotation work ok in iOS's part, but wrong in unity's part...

 I only have two screen, the first in iOS, with one button, and when you pulse the button, open Unity. When I rotate my ipad, I see a black edge...

Any idea? I don't know what happen...

Thank you so much

AttachmentSize
Image icon la foto4.PNG73.71 KB

Autorotation Problem with iOS APP Native, Black Screen

February 13, 2014 - 7:44am #2

Make sure you are using the latest version of Unity and the latest version of XCode.

Then try the Image Targets sample and check that auto rotation works (and it does).

 

Then compare this with your own sample and code in order to identify the difference.

This should help you work out what the problem is.

 

I have a unity app with iOS native part, the rotation work ok in iOS's part, but wrong in unity's part...

However if you mix native iOS and Unity then this may be causing you further problems if the orientations become out of sync.

In order to try and solve this you need to tell Vuforia to rotate when your native iOS rotates, and the API to use here is:

    QCARUnityPlayer::getInstance().QCARSetOrientation(_curOrientation);

You can find examples of this by searching through the XCode project in iPhone_View.mm and UnityAppController.mm

 

HTH

N

Log in or register to post comments