- Home /
Overlay over a map
I have a map which is a gameobject with an image on it.
Now under the map are ressources.
I want to draw a visual representation of them on my gameobject so the player can see what is where.
Ofcourse i could now draw for every field a new gameobject but it seems to create 10000 gameobjects is a very heavy operation.
So i would rather only use one gameobject and draw on it an overlay and insert it infront of my map. How could i draw this?
Answer by Jessespike · Mar 11, 2016 at 10:12 PM
To update a texture, you can use: Texture2D.SetPixels. Drawing 10000 GameObjects seems excessive, but at least they would be batched. Your alternative, drawing 10000 items onto an image doesn't seem any better, unless it's only done sparingly.
Your answer
Follow this Question
Related Questions
Storing component of instance in an array 2 Answers
Please help my head is burning from this problem : i have multiple gameobject , same script 1 Answer
Script on multiple objects not working properly! 1 Answer
transform.SetParent(null); Not Working 1 Answer
Changing alpha value of a canvas from a different game object 1 Answer