public override void OnUpdate(TimelineGraphModificationManager manager, AnimationLayerMixerPlayable mixer) { if (!playable.IsValid()) { return; } if (!Clip) { return; } if (proceedTimeInEditMode && !Application.isPlaying) { var newTime = playable.GetTime() + Time.deltaTime; playable.SetTime(newTime); } if (Loop && playable.GetTime() > Clip.length) { playable.SetTime(0); } mixer.SetInputWeight(index, Weight01); if (Additive) { mixer.SetInputWeight(0, 1); } else { mixer.SetInputWeight(0, 1 - Weight01); } }
/// <summary> /// Called every frame to update weights /// </summary> public abstract void OnUpdate(TimelineGraphModificationManager manager, AnimationLayerMixerPlayable mixer);