Y
Y
yraiv2020-05-26 07:47:55
Unity
yraiv, 2020-05-26 07:47:55

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

1 answer(s)
Y
Yuri Kai, 2020-05-26
@yraiv

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 question

Ask a Question

731 491 924 answers to any question