unity使用脚本动态替换动画 并添加帧事件 using System.Collections; using System.Collections.Generic; using UnityEngine; [RequireComponent(typeof(Animator))] [RequireComponent(typeof(SpriteRenderer))] public class ReplaceAnimation : MonoBehaviour