Cooldown effect for a sprite

Hi all,
What I need is i have a slot for an object which after placed on something, it has a recharge time say 10 seconds. I need a transparent grayed out effect which moves from left to right… basically similar effect of a spell cooldown but not circular.

Ok, I know about alpha cutoff using cutout shader on a quad.But that works for opaque objects. I need a transparent sprite cut off. I know thats not possible using alpha cut off. But how will I achieve this for a sprite renderer?

Thanks for the help :slight_smile:

Well, I found a workaround for this.

What I thought of was place a grayed transparent sprite over the actual sprite and use iTween to reduce the scale of the grayed sprite in “x” in your required recharge time.

And since the scale will happen both sides, I just used a co routine which will move the sprite by half of the current scale till the scale becomes (0,1,1) either to left or right depending on whether you want right to left cool down or left to right.

Now I just hope this does not cause any big performance issues. If anyone knows whether doing this might affect the performance by a huge margin, then please let me know Thanks