Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Unity UI Use the UI to mark on the world map.

Discussion in 'UGUI & TextMesh Pro' started by AkhmedAbasov, Jan 11, 2019.

  1. AkhmedAbasov

    AkhmedAbasov

    Joined:
    Mar 13, 2014
    Posts:
    163
    I have a big map of the world, and there are a lot of objects on it. I decided to add each object a child Canvas and place a picture in it. This canvas will be seen by the world map camera.

    323.png 1212.png

    How much is a good way to create markers on the map?

    How much will this affect the performance on a mobile device? Would it be better to use a flat 3D object for this?
     
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,352
    i'd use plain quad meshes or sprites. (to avoid having lots of canvases and UI components)
     
  3. AkhmedAbasov

    AkhmedAbasov

    Joined:
    Mar 13, 2014
    Posts:
    163
    But in this case, I have to create a separate material for each icon?
    40 objects = 40 materials. It doesn't sound very good. Especially for a mobile device.
     
  4. AkhmedAbasov

    AkhmedAbasov

    Joined:
    Mar 13, 2014
    Posts:
    163
    Sprites - better than UI? I did not use 2D as a bad sign with them.
     
  5. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,352
    could use texture atlas if there's many icons.

    but this would be good problem to test with Profiler,
    spawn lots of UI objects, measure, then do same using quads and then sprites.