Making object "Blink"


I have a coin object that disappears after several seconds of hitting a ground. What I was thinking of doing was making it slowing “blink,” eventually blinking rapidly then disappearing.

Now, by “blink,” I mean making it disappear for 0.2f seconds then making it appear again. I am planning on implementing this via Coroutine, but I was wondering if it is not too costly to make a coin disappear by doing (renderer.enabled = false) then doing (renderer.enabled = true) this often in a short span of time. There could be up to 10~20 coins in the scene at the same time, all blinking at its own rate.

I feel like since this is not the most unique way of indicating that something is about to disappear in games, there must be some standard way of doing this.

So yeah - is this the most efficient way of doing this?

enable/disable is just a boolean switch, pretty much nothing.

I would think when rendering step comes in, Unity first check for that value to discard or process further the rendering.

It is nothing even for 20 coins and 2 times per second.