using System.Collections;
using System.Collections.Generic;
using UnityEngine;
///
/// This is used for all the components that use OnAnimator Move... it breaks the Timeline edition
///
[ExecuteInEditMode]
public class AnimatorMoveTimelineFixer : MonoBehaviour
{
public Animator anim;
void Start()
{
if (Application.isEditor && Application.isPlaying) Destroy(this);
}
private void OnAnimatorMove()
{ if (anim != null) anim.ApplyBuiltinRootMotion(); }
private void Reset()
{ anim = GetComponent(); }
}