What is the MM Time Manager?
Being able to manage your game’s timescale safely and efficiently is essential. Feel comes with a (completely optional) time scale manager, the MMTimeManager. It’s lightweight, very easy to use, and will let you implement slow down effects, free frames, or speed up your game in a smooth way using only one-liners.
Using the MM Time Manager

To start using the MMTimeManager, all you need to do is create a new empty object in your scene, optionally name it TimeManager, and via the Add Component menu, add a MMTimeManager to it. That’s it, you’re ready to control time!
From its inspector, you’ll be able to tweak the following settings:
- Normal Time Scale: the reference time scale, the one the system goes back to once all timescale modifications are over. 1 by default
- Update Timescale: whether or not to update Time.timeScale when changing time scale. You’ll want to keep this on in most cases
- Update Fixed Delta Time: whether or not to update Time.fixedDeltaTime when changing time scale, proportionally to the new time scale. This keeps physics smooth when time slows down
- Update Maximum Delta Time: whether or not to update Time.maximumDeltaTime when changing time scale, proportionally to the new time scale
In its Debug section, you’ll find the Current Time Scale (the actual time scale right now) and the Target Time Scale (the one it’s interpolating towards), as well as a test button that slows time down to 0.5 for 3 seconds, to quickly check your setup at runtime.
Using feedbacks to control time
You can now control the timescale, and don’t even have to use code to do so. The following steps will guide you through the setup of a simple feedback that will let you slow down time for a short moment.
How to control the timescale using a feedback?
- in Unity 6000.5.0f1 (or higher), create a new project and import Feel v6.4 via the Package Manager, in an empty scene
- Create a new empty object, name it MMTimeManager, add a MMTimeManager component to it
- Create a new empty object, name it Test, add a MMF_Player component to it
- Add a Time > Timescale Modifier feedback to your MMF Player
- Press play in the editor, then the green Play button on your MMF Player, time scale will slow down to half speed for 1 second, then come back to normal
You could also use a Time > Freeze Frame feedback to trigger (you guessed it) freeze frames.
Controlling time via code
Once you have a MMTimeManager in your scene, you can start controlling time from any script, simply by triggering events. Here are a few examples of the kind of calls you can make:
A simple use of the time manager is triggering freeze frames, stopping time for a very short duration, a game feel technique commonly used to put the spotlight on the impact of a hit. Here’s how you can trigger a short one:
MMFreezeFrameEvent.Trigger(0.05f);
The following line will, from any script, order the timescale to change to 0.5 (so time will appear slowed down by half), for 1 second, with a smooth transition. After that one second, the timescale will revert to normal on its own.
MMTimeScaleEvent.Trigger(MMTimeScaleMethods.For, 0.5f, 1f, true, 50f, false);
The last parameter in that call (infinite) can be used to alter a timescale permanently (until we change our mind about it). This next line will permanently change the timescale to 0.25 (so a quarter of normal speed):
MMTimeScaleEvent.Trigger(MMTimeScaleMethods.For, 0.25f, 0f, true, 50f, true);
And to get back to a normal timescale, it’s as simple as calling this line:
MMTimeScaleEvent.Unfreeze();
It’s important to note that the MMTimeManager lets you stack timescale modifiers. So you could for example have an event change the time scale from 1 to 5, then 2, then 0.5. If you were to call Unfreeze a first time, you’d go back to 2, call it again, you’re at 5, then one more time to go back to 1. This makes having multiple objects interact with the timescale very safe.
If you want to bypass the stack and just reset the timescale instantly to its normal state, you can use this line:
MMTimeScaleEvent.Reset();
The examples above interpolate the timescale using a speed. For more control, you can also interpolate it over a duration, along a curve of your choice, and optionally interpolate it back when unfreezing. Here we slow time down to 0.2 over 0.3s using an ease out cubic curve, for 2 seconds, and then go back to normal over 0.5s:
MMTimeScaleEvent.Trigger(MMTimeScaleMethods.For, 0.2f, 2f, true, 0f, false,
MMTimeScaleLerpModes.Duration, new MMTweenType(MMTween.MMTweenCurve.EaseOutCubic), 0.3f,
true, new MMTweenType(MMTween.MMTweenCurve.EaseInCubic), 0.5f);
Reading and setting the timescale directly
The MMTimeManager is a singleton, so you can also access it directly from any class:
// the current, actual time scale
float currentTimeScale = MMTimeManager.Instance.CurrentTimeScale;
// the time scale the manager is interpolating towards
float targetTimeScale = MMTimeManager.Instance.TargetTimeScale;
// permanently sets the time scale to 0.5, the same as triggering an infinite MMTimeScaleEvent
MMTimeManager.Instance.SetTimeScaleTo(0.5f);
// instantly sets the time scale back to the Normal Time Scale
MMTimeManager.Instance.ResetTimeScale();
Remember that if you’re using the MMTimeManager, you should avoid setting Time.timeScale yourself, otherwise the manager won’t know about it, and will override your changes the next time it updates the timescale.