Log in or register to post comments

Rotation problems w/ Unity 3.5.6 & iOS 5./6.0 & QCAR 1.5

October 1, 2012 - 10:34am #1

Hi all,

 

I downloaded today the newest Unity version which should behave well with iOS 6. 

However, testing an AR App which uses QCAR 1.5 I had different issues regarding orientation.

I tested the App on iPhone 4 & 5 and iPad 2. iOS mixed (5 & 6). On each constellation I encountered different troubles.

 

Target orientations: Both Landscape modes & autorotate.

Any idea?

 

b4 

Rotation problems w/ Unity 3.5.6 & iOS 5./6.0 & QCAR 1.5

October 3, 2012 - 2:26am #13

If you can PM me with a link to a sample project I will aim to take a look.

N

Rotation problems w/ Unity 3.5.6 & iOS 5./6.0 & QCAR 1.5

October 2, 2012 - 8:33am #12

Okay, some more details:

- I set up Unity with autorotation + both landscape orientations.

- The xcode project behaves well (tested on iPad2 and iPhone5, iOS 5 and iOS 6) if I do not add iOS Views

- If I add viewcontroller(s) in iOS, they are not rotated as they should

Does anybody have some sample code how to set up additional iOS ViewControllers which rotate as they should - on iPad*/iPhone* iOS5&6 !?

Rotation problems w/ Unity 3.5.6 & iOS 5./6.0 & QCAR 1.5

October 2, 2012 - 7:37am #11

NalinS wrote:

Are you mixing Unity and native iOS via XCode?

BTW have you tried setting the orientations required in Unity?  

The other thing to be aware of is that iOS6 handles orientation issues very differently to iOS5 - worth a web search...

N

Yes, I have a small Unity AR game - and I use iOS to set up some view controllers for Menu, Help and Impressum. As I am rather an iOS developer than a Unity one, I do it in this way...   

@2) Yes, tried to set up orientations in UNity as well as in Xcode, w/o success.

@3) I set up orientation handling mainly as shown in post #2

b4

Rotation problems w/ Unity 3.5.6 & iOS 5./6.0 & QCAR 1.5

October 2, 2012 - 6:41am #10

Are you mixing Unity and native iOS via XCode?

BTW have you tried setting the orientations required in Unity?  

The other thing to be aware of is that iOS6 handles orientation issues very differently to iOS5 - worth a web search...

N

Rotation problems w/ Unity 3.5.6 & iOS 5./6.0 & QCAR 1.5

October 2, 2012 - 5:54am #9

Argh, after the change of the SDK (now 1.5.9) the log shows the right SDK, but the orientation still stucks. Some fullscreen view controllers are rotated wrong. The views are added as subviews as well as modally. I need the right orientation(s) on iPad & iPhone for devices 5.0-6.0. But these constellations lead partially to different orientation errors.

However I will now follow thread https://ar.qualcomm.at/content/problem-screen-orientation-ios6-both-iphone-and-ipad (Post #14 describes the same problem) and hope for some solution. In the meanwhile I will play around :)

b4

Rotation problems w/ Unity 3.5.6 & iOS 5./6.0 & QCAR 1.5

October 2, 2012 - 4:58am #8

Ah, I see!

I thought the package vuforia-unity-ios-1-5-9.app ALREADY includes the SDK 1.5.9 ...

Now I installed vuforia-sdk-ios-1-5-9.app and copied the libQCAR.a file into the Unity project.

Thanks for the clarification - obviously it was my mistake :)

 

Rotation problems w/ Unity 3.5.6 & iOS 5./6.0 & QCAR 1.5

October 2, 2012 - 3:07am #7

QCAR Extension version 1.5.10

This relates to the Unity extension

QCAR SDK version 1.5.8

means the version of libQCAR.a

As this is 1.5.8 rather than 1.5.9 it probably means that you have not copied over the new native library into your Unity project, which means that it will not have the fix for the iOS colour shift issue

N

 

 

Rotation problems w/ Unity 3.5.6 & iOS 5./6.0 & QCAR 1.5

October 2, 2012 - 3:02am #6

NalinS wrote:

Can I just check you have done these steps?:

In order to verify that your application is using the latest library you can check the Xcode log in the output window for the presence of the following string  "QCAR SDK version 1.5.9"

Thanks for your reply :)

@version: If I really install the latest SDK (Vuforia UNity 1.5.9 !!) and set up a new empty project, I get the following xcode log:

QCAR Extension version 1.5.10

2012-10-02 11:52:47.785 testtt[481:607] INFO/AR(481) 2012-10-02 11:52:47: QCAR SDK version 1.5.8

...

Creating OpenGLES2.0 graphics device

Initialize engine version: 3.5.6f4

I am confused about the different versions (1.5.8, 1.5.9, 1.5.10) ...

Best

b4

Rotation problems w/ Unity 3.5.6 & iOS 5./6.0 & QCAR 1.5

October 2, 2012 - 2:26am #5

Can I just check you have done these steps?:

For issue 1)  you will need to replace the libQCAR.a file in the Assets/Plugins/iOS  directory of the Unity project with the new libQCAR.a library file before generating the iOS project that is to be build by Xcode. 
Then build your app as usual.

For issue 2) we have a simple fix that works with Unity 3.5.x. after the project has been generated in Xcode:

    •  Open the generated project in XCode and locate the file AppController.mm
    •  At or around line 667 locate this line:  UnitySetScreenOrientation(requestedOrient);
    •  Above this line insert This:  QCARUnityPlayer::getInstance().QCARSetOrientation(requestedOrient);
    •  build your app as usual

 

In order to verify that your application is using the latest library you can check the Xcode log in the output window for the presence of the following string  "QCAR SDK version 1.5.9"

Rotation problems w/ Unity 3.5.6 & iOS 5./6.0 & QCAR 1.5

October 2, 2012 - 1:14am #4

I have a lot of view controllers, being all in Landscape only.

Regarding Vuforia version: I imported Vuforia-Unity-1-5-9.unitypackage. However this results in having a License-Readme.txt File with the content:

Vuforia AR SDK for iOS v1.5.8

...

 

Best regards

Rotation problems w/ Unity 3.5.6 & iOS 5./6.0 & QCAR 1.5

October 1, 2012 - 11:15am #3

Hi bayern4

Can you be a bit more specific about what the problems are, as I have been testing Unity 3.5.6f4 with iOS6 and have not yet seen an issue here.

If you can guide me on steps to reproduce then please let me know.

Also, I wanted to check that you are using the latest Vuforia (1.5.9) and have looked at this thread: 

https://ar.qualcomm.at/content/compatibility-issues-ios6

and have been through all the steps...

 

N

Rotation problems w/ Unity 3.5.6 & iOS 5./6.0 & QCAR 1.5

October 1, 2012 - 10:37am #2

some additional info:

On iOS/xcode I used this code snipped on the view controllers (for iOS 6 and <=5 compatibility purpose):

 

-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation

{

    return UIInterfaceOrientationIsLandscape(toInterfaceOrientation);

}

 

- (BOOL)shouldAutorotate

{

    return TRUE;

}

 

- (NSUInteger)supportedInterfaceOrientations

{

    return UIInterfaceOrientationMaskLandscape;

}

Log in or register to post comments