I’ve asked this question in Answers, but got no really useful direction, I’d love an answer from Unity as to the performance of this, and any suggestions for how I should be implementing it best practice or otherwise.
I have been using:
- rectTransform.position = Camera.main.WorldToScreenPoint(unit.transform.position);
In the UI elements update event, but it slows down a lot with just that line once you have 20-30 units. I’ve tried putting them all on one canvas, and giving each a separate canvas (per a suggestion in Answers to use a separate canvas for each), but it appears to be the WorldToScreenPoint function causing the slowdown.
Ideally I need to draw up to 100 of theses on screen at a time, each following a unit or building (where the case might be the view scrolling or zooming, and I cant really progress until I know there is A WAY to do this efficiently.
Any thoughts are welcome - please!