Search Unity

SpriteRender better than UI.Image for Map Icons?!

Discussion in 'UGUI & TextMesh Pro' started by shivansps, Sep 11, 2015.

  1. shivansps

    shivansps

    Joined:
    Feb 26, 2014
    Posts:
    60
    So, in my game i have a big map, is a 2D space game so, is a big Solar System map, in the map should appear the icons for planets, asteroids, units, etc.

    So for map icon i was using a empty Gameobject with a SpriteRender on it set on Z -1950 and attached to every gameobject that must have a map icon, when i open a map the camera goes to -1950 with depth 1 so it will show only the icons, its not perfect, but it works very well.

    I tryied to reemplace that with a worlspace canvas with a UI.Image at -1950 attached to the gameobjects, and if it worked well i could use that to add more funcionality to the map itselft later, but it was a complete dissaster, doing the exact same work, with gameobjects with a spriterenderer is about 8ms on cpu after spawning a map and doing nothing else, the same with a worldspace canvas and UI.Image it jumps to 50ms!!! Remember that i have, i never counted, but at least 1000 objects in the scene.

    This is supposed to be like this?
     
    Last edited: Sep 11, 2015