public void EditEvents(GameObject gameObject, AnimationClip clip, bool[] selectedIndices) { List <AnimationWindowEvent> awEvents = new List <AnimationWindowEvent>(); for (int index = 0; index < selectedIndices.Length; ++index) { if (selectedIndices[index]) { awEvents.Add(AnimationWindowEvent.Edit(gameObject, clip, index)); } } if (awEvents.Count > 0) { Selection.objects = awEvents.ToArray(); } else { ClearSelection(); } }
public void EditEvent(GameObject gameObject, AnimationClip clip, int index) { AnimationWindowEvent awEvent = AnimationWindowEvent.Edit(gameObject, clip, index); Selection.activeObject = awEvent; }