The Movement and Timing Objects

Some assets require a lengthy setup process in order to run properly in your scene, Movement over Time is not one of those assets. All that’s required in order to run an effect is to include the MovementEffects namespace, build a sequence, and call Movement.Run. However, you can achieve an additional level of control by knowing how the Movement and Timing objects work.

If you change nothing than the first time you call Movement.Run, the Movement object will either add itself to your EventSystem gameObject (if you have one in your scene) or to a new gameObject called “Movement Effects”. Movement is like a singleton, except that a singleton guarantees that there is only a single instance, whereas the Movement object guarantees that there is at least one instance.

If you like you can add the Movement and Timing objects to any gameObject in your scene and Movement over Time will use that instance rather than creating a new one. If the Movement object or the gameObject that it is attached to are disabled or deleted then all movement effects will immediately stop, so you probably want to keep the Movement object on a gameObject where that will never happen.

As you can see in the image on the right, the movement object does have two settings that you can change: Default Sequence Timing and Pool Instance Variables. If you change the default sequence timing then all new sequences that are initialized with their timing set to Default will use the value you select here. If you uncheck Pool Instance Variables then no new objects will be added to the instance pools. The rest of these values are for reference so you can see how the instance pools are being used. If you try to change them they will just change back again next tick.