Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
1
Question by Magmaton · Aug 11, 2017 at 08:34 AM · iosmapgpsobjective-cuiview

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 :

alt text

My goal is that :

alt text

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 !

ui1.jpg (33.4 kB)
ui3.jpg (124.9 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

133 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Can we make game in Unity with Swift and Objective C or Do I need to learn another language for making games? 2 Answers

LocationServices on iOS provides much higher measurements than on Android 0 Answers

GPS power consumption 0 Answers

Mobile Notification Package iOS Location Trigger (Geofencing) not firing 3 Answers

Trying to Build GPS Tracking Based App, Help 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges