Animator does not affected by Chronos

AndTorch 4 years ago updated by Lazlo Bonin (Lead Developer) 3 years ago 3


I have a very simple setup on my player's character: Animator controller and Timeline that looks at global clock called "Gameplay". When I change timeScale in inspector in play mode Animator continue playing with default speed.

I made a hack for this:

private void Awake()
    _animator = GetComponent<animator>();
    _timeline = GetComponent<timeline>();
private void Update()
    _animator.speed = _timeline.timeScale;

But I guess it's not how this suppose to work...

Could you help me with that issue? Thanks!

Chronos Version:
Unity Version:

So, I found the problem. If you call timeline.CacheComponents() during Awake() or OnEnable() then all cached components will be null (animator, rigidbody, etc.) which is weird since all these components attached to gameobject in the inspector and exist when Awake() and OnEnable() fired.


Hi AndTorch, sorry for the extremely late reply on this.

As you figured out, for performance reasons, Chronos does indeed cache components.

This is described in the documentation here: https://ludiq.io/chronos/documentation#localclock.CacheComponents

You only have to call CacheComponents after a change in the component list for Chronos to behave properly!