Skip to content

Custom Scaled Time

By default, the asset shaders use Unity’s _Time variable for all the animated effects. This _Time variable will scale with Time.timeScale. Meaning that if the game pauses the effects won’t animate either. This is what we usually want.

But if for some reason you want the effects to keep animating While the game is paused you need to follow these 2 steps:

  1. Check the “Use Custom Time” toggle in the Material Inspector Advanced Configuration.
Advanced Configuration open: blending modes, Additive configuration, Premultiply Alpha and Color, Enable Z Write, Z TestMode, Culling Mode, Color Write Mask, Random Seed, Use Unity Fog, Use Custom Time, Enable GPU Instancing and Render Queue
  1. Have an active gameobject in the scene with the “SetAllIn1VfxCustomGlobalTime.cs” script attached.
Two scrolling materials while Time.timeScale falls to 0 and comes back: the default one stops, the one with Use Custom Time keeps moving