Unity view on top of iOS view
Hi everyone !
My english is not perfect, so forgive me for my mistakes. My employee ask me to create a Location system with a real-map world in Unity for Ipad. The purpose of this app is to go on different waypoint in the real world and play at some games. So the user need to zoom in/out, see his position on the map and see different marker position.
So, in Unity i have a scene with UI Canvas which contain a text and one image. I created a iOS plugin which use iOS MapKit tool for showing a real-map world. But i don't understand how manage my view to show the Unity UI and, back of that, my map ! So i made a screen of my Unity scene :
My goal is that :
I tried lot of things and tricks to obtain that :
Create a UnityAppController subclass
Create multiple view and manage them in subview
Change layer_opaque = YES to NO ...
But when i do all of that tricks, the result is my unity scene only (screen 1) or just my map. This is my Plugin code : MapPlugin.m
#import "MapPlugin.h"
void _LoadView(float widthView, float heightView)
{
MapPlugin *plugin = [[MapPlugin alloc] init];
[plugin LoadView:widthView andHeight:heightView];
}
@implementation MapPlugin
-(void) LoadView: (float) widthView andHeight:(float) heightView {
UIViewController *rootViewController = UnityGetGLViewController();
self.mapView = [[MKMapView alloc] initWithFrame:CGRectMake(0, 0, (CGFloat)widthView, (CGFloat)heightView)];
[self.mapView setShowsUserLocation:YES];
[rootViewController.view addSubview:_mapView];
}
So my question is : How can I manage my view to put Unity view in front of map view ?
I hope my question is clear :$.
Thank you for the time spent on my question !