Search Unity

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

Discussion in 'Unity UI (uGUI) & TextMesh Pro' started by Laguna_Seca, Jan 11, 2019.

  1. Laguna_Seca

    Laguna_Seca

    Joined:
    Mar 13, 2014
    Posts:
    115
    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:
    5,201
    i'd use plain quad meshes or sprites. (to avoid having lots of canvases and UI components)
     
  3. Laguna_Seca

    Laguna_Seca

    Joined:
    Mar 13, 2014
    Posts:
    115
    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. Laguna_Seca

    Laguna_Seca

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

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    5,201
    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.