How to change the colour of a prefab back to default to save draw call

In my game I need to change the colour of a prefab for a certain amount of time, which obviously then increases the number of draw calls, how would i change it back the the prefabs default later to then decrease the draw calls?

thanks in advance.

Once you’ve changed the color, you’ve created a new material instance, so just changing the color back will have no effect since you’re still using the new material instance. The best thing is not to create new material instances, which will require other techniques such as vertex colors or texture atlases. (The color property for sprites, for example, uses vertex colors.)

Or, depending on what you’re doing, it may be feasible to manually create one or more material instances yourself, then change the color of those instances and use sharedMaterial to assign them as needed. So you’d never use renderer.material, only renderer.sharedMaterial.