public static AnimationWindowEvent CreateAndEdit(GameObject root, AnimationClip clip, float time)
{
AnimationEvent evt = new AnimationEvent {
time = time
};
int num = InsertAnimationEvent(ref AnimationUtility.GetAnimationEvents(clip), clip, evt);
AnimationWindowEvent event3 = ScriptableObject.CreateInstance<AnimationWindowEvent>();
event3.hideFlags = HideFlags.HideInHierarchy;
event3.name = "Animation Event";
event3.root = root;
event3.clip = clip;
event3.clipInfo = null;
event3.eventIndex = num;
return event3;
}