I need some help with a Fractional Heart System?

I’m trying to create a heart system that displays my health with 5 hearts and reduces in fractions every time. I want to make the maximum health 200 so that means every quarter is 10 and every heart is 40.

I know that you have to reference 5 different heart sprites by using 5 cases and assigning each one then when generating them you just use a prefab to spawn them in a horizontal layout group, but that’s as far as my knowledge goes, and it’s more I know how it works but not how to code it.

Thank you in advance for any help I get:)

You mean a system like this? Over there I made a WebGL example.