How do I make my Sprite look Cracked


I can’t seem to find a soloution online, I expected to find a lot more people asking this question.

Basically, I want an object to show a crack overlay or something (I’m assuming using shaders) when it’s health decreases. Kinda like Minecraft, when you start hitting a block.

The closest thing that I found was this shader

but I think it’s outdated, it has some errors.

Anyway, which direction should I be heading? right now I have it doing this

if (hitPoints <= 80) spriteRenderer.sprite = damagedSprite;

but that’s just replacing the sprite.

Thanks a lot!!

Yes. So, you could make an animation, and like a boolean (hit) that would be:
hit = false,
and when it’s hit, it becomes
hit = true,
playing the animation, or you could replace the sprite.