Log in or register to post comments

Using the Vuforia EAGLView as a subview in an iOS app

August 31, 2012 - 1:31pm #1

I'm working on an app that may require the Vuforia AR view to be a subview of a UIView, allowing some native iOS elements to be seen and used at the bottom of the screen. I'm using Unity and I see that in the AppController.mm, in the        

"int OpenEAGL_UnityCallback(UIWindow** window, int* screenWidth, int* screenHeight,  int* openglesVersion)" method,

the EAGLView is a UIView and is a subview of the window "_window". It seems like the EAGLView could be made a subview of a UIView in another ViewController, but Unity makes "_window" full screen. I'd like to resize the EAGLView and display it on a ViewController with some iOS GUI elements. I've tried and either gotten Unity errors in the Xcode console or had the Unity view come up, apparently on top of the view I wanted it a subview of, and with very slow framrate. Before I spend hours trying to get this to work I would like to know it is even possible? Can I resize the Unity view and make it a subview of something in another viewcontroller? Thanks in advance for any help.

Using the Vuforia EAGLView as a subview in an iOS app

September 3, 2012 - 12:51am #2

Hi dshriver,

We normally recommend that if you do your development in Unity, then stay in Unity, as trying to change the project in XCode after generation could get quite complicated.  I am not aware of anyone developing with this approach.

If you need to control the views, look at how Unity does this, and you could also look at how the samples handle the GUI as well as this shows how the buttons overlay the video/augmentation.

N

Log in or register to post comments