[Solved] Force ParticleSystem to use unscaledDeltaTime?

By this I mean I’d like my ParticleSystem to behave identically at different Time.timeScales.

I realize I can accomplish this (in a manner of speaking) using Get/SetParticles, but it occurred to me to ask in advance of committing to this approach.

While we’re at it, how about unscaled WaitForSeconds statements in Coroutines? That’d be quite handy as well. :wink:

Thanks,

There doesn’t appear to be a way to have a ParticleSystem ignore time scale that I could find, but there is an easier way than using Get/SetParticles:

particleSystem.playbackSpeed = 1f/Time.timeScale; // whenever timeScale changes

I get the feeling you probably know this one, but for the benefit of anyone who arrives by search:

float unscaledTimeRemaining = /* time */;
while (unscaledTimeRemaining > 0f) {
    yield return null;
    unscaledTimeRemaining -= Time.unscaledDeltaTime;
}

Personally, I’m dying for custom YieldInstructions subclasses in general.