Ios5 and unity 3.4.1 crash on auto-rotation workaround

go AppController.mm and look for DestroySurface function
add

before

it should look like this in the end

Didn’t try but thanks for sharing.

I can confirm that Alexey’s ‘UnityFinishedRendering()’ fix works. Thanks, Alexey.

My alternative workaround, was to untick ‘Use Animated Autorotation’ in Player Settings. It is only the animated auto rotation that crashes.

Very strange. I had a problem where my build was failing with one error (though the error log was huge). Originally I fixed it by doing what is mentioned above. Now I’ve added the Prime31 iCloud plugin, enabled the iCloud Entitlement in xcode and added the updated provisioning profile (with iCloud enabled) and I’m getting the error again. Only this time it says it’s in AppController+OpenFeint.mm instead of AppController.mm.
I checked that the UnityFinishedRendering() function call is still in the DestroySurface() function and it is. Not sure what is generating this error again.
The actual error is with the Apple LLVM Compiler 3.0. I also have two warnings, but I had those before and it still compiled after doing the above solution. One refers to some orientation switch kScreenOrientation etc. and the other is incompatible pointer types UIView and EAGLView.

these are safe and can be ignored.

Please don’t make assumptions about origins of error. Bug report with repro case

Adsy, some Prime31 plugins are having issues because they are trying to include a dynamic library that is no longer included as of the iOS 5 SDK. You can contact Prim31 or visit the Prime31 thread for assistance.

Alexey, can we safely ignore this issue if we find that it’s not occurring in our products (even when compiling on Xcode 4.2 with iOS 5 SDK) or would it be wiser to go ahead and make the addition anyway?

Mark,take a look.

yeah, add it. It will be like this in 3.5 anyway :wink:

Hi,

Thanks for the workaround we reverted to half-baked pre-3.4 rotation code that we made, but this is a lot more visually appealing as well as it works with the iPhoneUtils.PlayMovie when it rotates. I think this will help when Apple certification comes around.

Speaking of iPhoneUtils.PlayMovie… in iOS5 the video player will pause when the app is suspended. So when the app is resumed the app is essentially frozen if you have iPhoneControlMode.Hidden enabled. Could you update it so that when the app is resumed the video will resume as well? We have had to put TouchToSkip on all of our videos, even those we don’t necessarily want to skip.

Thanks!

Anyone know if this is fixed in 3.5?

yes, it is fixed