Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Maps In Unity 3D - Share your experience

Discussion in 'Assets and Asset Store' started by AlanGrant, Mar 7, 2018.

  1. shirleycreates

    shirleycreates

    Joined:
    May 18, 2021
    Posts:
    2

    Hey Alan!

    Love the plugin so far and really excited to understand it better. I'm not much of a coder and just got into development. Currently, I'm attempting to add objects to the map. I've gone through the tutorials but I'm still a little confused.

    I'm using Mapbox and I've set up the Google Places API, everything is working well on that end. However, in order to instantiate the objects does it have to be done in the code? Or is there somewhere in the inspector that I can att the lat, long? I tried finding the DropPin method but I don't see anything for coordinates in the inspector. Any help with this?

    Thanks
    Shirley
     
  2. Falondrian

    Falondrian

    Joined:
    Nov 1, 2017
    Posts:
    70
    Hello, I have a couple requests for the BaseLocationManager:
    - add a onSpeedChanged event
    - add the function LoadDemoLocation to this class as empty virtual, so I can implement it my own subclass (I dont use LocationManager)
     
  3. AlanGrant

    AlanGrant

    Joined:
    Aug 27, 2016
    Posts:
    97
    Hello Shirley,

    Thanks for purchasing GoMap!
    The easiest way to add gameobjects to specific kind of places, without coding, is to use the native mapbox POIs and it's done just like that.

    upload_2022-1-28_17-3-12.png

    Expand the GoMap inspector, find the Pois section, add an element to the rendering options list and enter the kind of place and the prefab you want for each of the points of that kind. Remember, the "disabled" flag needs to be off.

    upload_2022-1-28_17-3-29.png


    And that's the result!



    Bye
     

    Attached Files:

  4. AlanGrant

    AlanGrant

    Joined:
    Aug 27, 2016
    Posts:
    97
    Thanks I'll consider it in the next releases.
    Bye!
     
  5. godril

    godril

    Joined:
    Oct 21, 2013
    Posts:
    3
    Hey everyone. I bought the asset but the GPS is not starting somehow, anyone else had this happen to them?
     
  6. AlanGrant

    AlanGrant

    Joined:
    Aug 27, 2016
    Posts:
    97
    This could happen on iOS if you forgot to add the location permission string in the build settings.
     
  7. godril

    godril

    Joined:
    Oct 21, 2013
    Posts:
    3
    it's happening on Android, even if I manually allow the location permission. It then says that the signal is weak.
    I was using Unity 2020.28f1 but using 2020.3.4f1 it seems to work (still, I have to manually allow the permission).

    The issue with 2020.3.4f1 is that the rendering options menu when opened, overlays with the rest of the interface rending it unusable.

    Any recommendation on a unity version that will work with this asset?
    Thank you ;)
     
    Last edited: Feb 14, 2022
  8. Kholeslaw

    Kholeslaw

    Joined:
    May 7, 2013
    Posts:
    35
    @AlanGrant I am trying to import the Mapbox SDK into my project which already has Go Map installed and it is conflicting with the existing scripts used for decoding mapbox tiles. Do you have a version of Mapbox SDK which is tailored to work with Go Map, or some guidance as to how to get these two assets to work in the same project?

    I am using Go Map for it's great 3D world map but I also need to implement a lightweight slippy map elsewhere in the game. I tried doing it with Go Map but it is far too slow for this purpose. Using Mapbox SDK slippy map is very fast in comparison, I thought I would use each for their own strengths.

    I am also open to other suggestions on meeting my needs.
    thanks!
     
  9. AlanGrant

    AlanGrant

    Joined:
    Aug 27, 2016
    Posts:
    97
    I'm using Unity 2021.1.2f1
     
  10. AlanGrant

    AlanGrant

    Joined:
    Aug 27, 2016
    Posts:
    97
    Even though I'm not always experiencing this bug, it seems a known unity bug and it is fixed in the latest unity version: https://issuetracker.unity3d.com/issues/scriptableobject-with-an-array-of-serializable-classes-with-arrays-in-them-is-overlapping-in-the-inspector-when-expanded

    I
    've tested using 2021.2.11f1 and it seems to be working fine.
     
  11. AlanGrant

    AlanGrant

    Joined:
    Aug 27, 2016
    Posts:
    97
    To use both GoMap and Mapbox sdk in the same project you can safely delete the folder GoMap - 3D Map For AR Gaming/GOShared/Decoders/Mapbox/vector-tile-cs-master
     
    Kholeslaw likes this.
  12. godril

    godril

    Joined:
    Oct 21, 2013
    Posts:
    3
    Indeed with v2021 the inspector issue disappeared, thank you.
     
  13. chrenzi

    chrenzi

    Joined:
    Aug 15, 2019
    Posts:
    1
    Hi,
    I'm trying to replace the hot air balloons prefab with something different, but I can't find where they are defined. Can anyone help?
    Thanks
     
  14. BlazinXun

    BlazinXun

    Joined:
    Nov 20, 2020
    Posts:
    1
    Hi, I am having issues with the GPS update due to the issues with Unity and Android 12. Is there any workaround for this? Thank you.
     
  15. Cyb3rNomad

    Cyb3rNomad

    Joined:
    Oct 18, 2020
    Posts:
    3
    Hi Alan, wonder if you may be able to help. I am trying to get the unique building id of the buildings from the MapBox API and add this to the GoFeature class so I can identify each building. MapBox already has these from their API "mapbox.mapbox-streets-v8"

    In the GOPbfProcedure class I'm pretty sure I'm getting the correct building id by adding.
    Code (CSharp):
    1. gf.id = vtf.Id;
    on line 157

    and also on added on line 280
    Code (CSharp):
    1.    gfm.id = gf.id;
    Is this the correct way to get building ids?
    Would it be possible in a future update to be able to combine the mesh's of Multi Polygon GOFeature's that share the same building id into one mesh ?

    I understand this could become complicated where there is a building that shares ids across multiple tiles like this one

     
    Last edited: Mar 13, 2022
  16. fschaar

    fschaar

    Joined:
    Jul 3, 2012
    Posts:
    8
    Is it possible to remove layers from the tiles during runtime or reload tile with less layers - like removing buildings?
    I tried to hit disable on a layer, but it throws errors
     
  17. fschaar

    fschaar

    Joined:
    Jul 3, 2012
    Posts:
    8
    Okay, I managed to do this with useOnly.the thing is, I want to zoom out and by doing this, i want to reduce complecity of the map, by removing buildings first, then major roads, then small roads etc. What is the best way to do that? Triggering a reload? How to do that? And then everything will be rebuild, which is not intended, I just want to remove the buildings for example.
    Any hints?
     
  18. RogueStarSlade

    RogueStarSlade

    Joined:
    Mar 6, 2021
    Posts:
    1
    Has anyone successfully integrated this with the Oculus Quest 1/2? Curious if anyone has attempted and has had some success.
     
  19. Danny9421

    Danny9421

    Joined:
    Mar 21, 2022
    Posts:
    29
    Is there one of the available services free to use ?
    Mapbox api might charge after 25k monthly users.
    Maptiler api might charge if request > 100k
    ESRI might charge after 2000000 tiles ?
    NextZen free ?

    Is there a way to use the plain OSM api ? (which seem to be free always)
     
    Last edited: Jun 1, 2022
    AM-Dev likes this.
  20. MikeCheck123

    MikeCheck123

    Joined:
    Jun 6, 2022
    Posts:
    6
    Hey @AlanGrant and everyone,

    Im having a problem with my character animation. The character starts the walk animation but stops every few steps going back and forward with the Idle animation. Any ideas on what is causing this?

    ezgif.com-gif-maker (3).gif
     
  21. sunlin15803469083

    sunlin15803469083

    Joined:
    May 6, 2022
    Posts:
    1
    hi,@AlanGrant, i watch your tutitor about use custom POI data,but, it too old to i cannot make it work following your step, can you spend some time update yout document? thank you
     
  22. AhmadAllahham

    AhmadAllahham

    Joined:
    Jun 23, 2022
    Posts:
    1
    For anyone experiencing this issue, I found a workaround mentioned here:
    https://issuetracker.unity3d.com/is...n-the-inspector-when-expanded?page=4#comments
    By adding "[NonReorderable]" behind the variable decleration of "renderingOptions" in "GoLayer.cs", it seems to stop the overlapping issue
     
  23. TempestDroneworx

    TempestDroneworx

    Joined:
    Jul 12, 2022
    Posts:
    18
    Anybody have experience with the event handler for onOriginSet? I finally figured out why my conversion to Vector3 was sending my objects off the map. It seems so simple when I see their code, but yikes... I'm not getting the same results as the GO Maps examples. So... here's what I have...

    Inside an empty object, I have the DroneData class which contains all of this at the top...

    Code (CSharp):
    1. using System;
    2. using System.Collections;
    3. using System.Collections.Generic;
    4. using UnityEngine;
    5. using UnityEngine.UI;
    6. using System.IO;
    7. using System.Linq;
    8. using System.Text.RegularExpressions;
    9. using System;
    10. using GoMap;
    11. using System.Collections.Generic;
    12. using UnityEngine.Networking;
    13. using LocationManagerEnums;
    14. using GoShared;
    15. using UnityEngine.Events;
    16.  
    17. using UnityEngine.SceneManagement;
    18.  
    19. public class DroneData : MonoBehaviour
    20. {
    21.  
    22.     //initialize variables
    23.     public GOMap goMap;
    Then, down below in the start I have this:

    Code (CSharp):
    1. // Start is called before the first frame update
    2.     void Start()
    3.     {
    4.         loadDroneList();
    5.         Debug.Log(goMap);
    6.         //SceneManager.sceneLoaded += OnSceneLoaded;
    7.         goMap.locationManager.onOriginSet.AddListener((Coordinates) => {OnOriginSet(Coordinates);});
    8.         //goMap.locationManager.onOriginSet.AddListener(SpawnDrones);
    9.         //goMap.locationManager.onLocationChanged.AddListener((Coordinates) => {OnLocationChanged(Coordinates);});
    10.        
    11.     }
    12.  
    13.   void OnOriginSet(Coordinates originCoords){
    14.         Debug.Log("gotHere");
    15.         //SpawnDrones();
    16.     }
    and it generates this in the console:

    upload_2022-8-4_16-37-6.png

    so apparently goMap is returning null, and it really shouldn't so far as I can tell. Any ideas what I'm doing wrong? Because my code looks almost exactly the same as the Avatar's code in the example I'm building this test on top of...

    HELP?!
     
  24. AlanGrant

    AlanGrant

    Joined:
    Aug 27, 2016
    Posts:
    97
    Hi,

    You're probably just missing the linking part.
    In your script inspector you'll see a GoMap empty box where you cn drag the GoMap game object that's in your scene. In this way the goMap variable in your component will not be null.

    I hope that helps,
    Alan
     
    TempestDroneworx and Danny9421 like this.
  25. TempestDroneworx

    TempestDroneworx

    Joined:
    Jul 12, 2022
    Posts:
    18
    Yup o_O
     
  26. TempestDroneworx

    TempestDroneworx

    Joined:
    Jul 12, 2022
    Posts:
    18
    ok, new question... trying to convert an AGL (above ground level) altitude to vector 3 in gomaps with a 3D terrain.

    1: is there an easy way built in?
    2: if not, how do I get the altitude at a set of GPS coordinates, and then what's the conversion ratio? (doesn't matter to me if it's meters, feet, etc... I can convert that myself)
     
  27. TempestDroneworx

    TempestDroneworx

    Joined:
    Jul 12, 2022
    Posts:
    18
    Just pinging again... any way to set an above ground level vector 3 coordinate based on known AGL altitude and GPS coords?
     
  28. TempestDroneworx

    TempestDroneworx

    Joined:
    Jul 12, 2022
    Posts:
    18
    Again, any help on getting AGL altitude marked would be really helpful. Do you have a hook for this?
     
  29. AlanGrant

    AlanGrant

    Joined:
    Aug 27, 2016
    Posts:
    97
    Hello,

    To convert any Vector3 to a Coordinates object you always have to use the "convertVectorToCoordinates" method. And remember to use it after GoMap has set the origin.

    Also, you shouldn't really "ping" me or anyone else on the forum, but you can send me an email and I will answer your questions in a matter of days.

    Bye
    Alan
     
  30. TempestDroneworx

    TempestDroneworx

    Joined:
    Jul 12, 2022
    Posts:
    18
    Happy to. I also DMed you. Please be so kind as to send me your email?
     
  31. appmechanic

    appmechanic

    Joined:
    Sep 10, 2016
    Posts:
    11
    Hello,

    I am using Go Map for my project, but I am facing some issue with Buildings spawning in the Road as well.

    Have a look at the Screenshot : https://drive.google.com/file/d/1HOB_HFA4_Vxjsr3gYGwbCt5omhZaPi2C/view?usp=sharing

    My Location Coordinate : 40.711872,-74.009636
    I am getting this issue on multiple coordinates.

    Can you tell me, why Buildings are spawning in the middle of Road?

    Please suggest me, how I can fix this.
     
  32. AlanGrant

    AlanGrant

    Joined:
    Aug 27, 2016
    Posts:
    97
    I answered at your email. That road is probably a tunnel and maybe you don’t want them rendered in your location based game.
     
  33. appmechanic

    appmechanic

    Joined:
    Sep 10, 2016
    Posts:
    11
    Hello Alan,

    I am not sure if I got the email from your end, I was waiting. Can you confirm again, My email ID is : info.appmechanic@gmail.com

    So I removed 2 types of Building Types from Terrain
    - Train Station
    - Buildings Part

    If I create the 3D Model of Tunnel and replace that Building with Train Station or some kind of Tunnel and set up necessary colliders, It will work, right?

    I still see some Building on the Road. That I found with Building name of "Building" itself. But if I remove that, most of th Buildings gets removed.

    Any idea, what exactly that refers too, what is the significance of Building name "Buildings"
     
  34. Faizalski

    Faizalski

    Joined:
    Oct 4, 2018
    Posts:
    23
    @AlanGrant
    Does your asset requires internet connection and gps to work? Also can I use it as an offline standalone app?
    Many thanks
     
    Last edited: Sep 16, 2022
  35. AlanGrant

    AlanGrant

    Joined:
    Aug 27, 2016
    Posts:
    97
    GoMap requires an active internet connection to download the map data. Also gps without internet connection has a very poor accuracy.

    Still GoMap has a caching feature that loads map data from a local storage if it was previously downloaded.
     
    shyamarama likes this.
  36. appmechanic

    appmechanic

    Joined:
    Sep 10, 2016
    Posts:
    11
    Hello Alan,

    I would like to change the Building 3D Models, like I want to Put my own 3D Models of Building as per its significance. Can you tell me, how can I do that. I want to add 3D Models of Hospital, Schools etc based on the Building Types.

    Looking forward hearing back from your end!

    Thanks & Regard
    Paramjot Singh
     
  37. choigw

    choigw

    Joined:
    Jul 21, 2020
    Posts:
    2
    there`s the shader problem on my project using URP.
    some materials not compatible with URP(Universe Rendering Pipeline) and try to find how to fix it.

    'Assets/GO Map - 3D Map For AR Gaming/Demo/Materials/GOTerrain materials/Low Poly Materials'
    materials in that path have the problem.
     
  38. OrionOmega

    OrionOmega

    Joined:
    Jun 30, 2022
    Posts:
    1
    Hi @AlanGrant, We bought your asset and we want make custom POIs, can you gives some tips.
    Thanks and keep the good work, your asset is pretty cool!