Answer the question
In order to leave comments, you need to log in
Health bar how to optimize?
How to make a health bar so that it is optimized. I watched the lessons, but if there are a lot of objects with a strip of HP on the stage, then there will probably be a heavy load (I looked where they did it through the sliders)
Answer the question
In order to leave comments, you need to log in
In my game, I made a HP strip through a simple shader. Perhaps it is not so optimized, but still better than creating a canvas for each object.
I took it from here: https://habr.com/en/post/447716/
Another little tip. You can draw bars not all the time, but only when the enemy is damaged and, say, after 2 - 5 seconds turn off.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question