So I found a solution to this, and just thought I would post it for any future person that encounters the same problem.
I modified Prime31’s etcetera plugin to be able to bring up a window that relies on UIScrollView. I found that doing this, it produced a UIScrollview in which it’s scrolling ability would randomly break, for absolutely no reason. It drove me nuts, for like 8 hours I was completely perplexed and in a mild panic as I had to get this working.
I found that the reason UIScrollview would bug out when drawn over Unity is because Unity by default sets the ios app to run on a timer that is on a seperate thread, that is synced to the refresh rate of the display (I believe thats what its doing) It’s done this way because it’s the best way to tune an app for opengl rendering. BUT, this makes it so the incoming input stream may have a few missing ticks here and there because the event loop is tuned for drawing, not for capturing every input. Internally Unity is set up to deal with this sort of input stream. But all the native ios ui’s are not, and so when using the UIScrollView, which relies on an interrupted stream of input to do it’s gestures and swiping, when the input stream would miss a tick, it would break.
The solution is actually simple, as described here:
http://unity3d.com/support/documentation/Manual/iphone-Optimizing-MainLoop.html
in appcontroller.mm disable CADDisplayLink by setting:
#define USE_DISPLAY_LINK_IF_AVAILABLE 0
and also switch it to use NSTimer by setting:
#define MAIN_LOOP_TYPE NSTIMER_BASED_LOOP
//#define MAIN_LOOP_TYPE THREAD_BASED_LOOP
//#define MAIN_LOOP_TYPE EVENT_PUMP_BASED_LOOP
So, hope that helps someone and you don’t have to rack your brain like I did digging through xcode to figure this out.
If your getting unpredictable behavior from overlaying native ios UI’s on top of unity, PROBABLY has something to do with this timer thing…
What I am curious to know, could it be possible to switch your app to NSTimer when using native ui’s, then switch it back to thread based when you re-enter unity?