private void DeleteEvents(AnimationClip clip, bool[] deleteIndices)
{
bool flag = false;
List <AnimationEvent> list = new List <AnimationEvent>(AnimationUtility.GetAnimationEvents(clip));
for (int i = list.Count - 1; i >= 0; i--)
{
if (deleteIndices[i])
{
list.RemoveAt(i);
flag = true;
}
}
if (flag)
{
AnimationEventPopup.ClosePopup();
Undo.RegisterCompleteObjectUndo(clip, "Delete Event");
AnimationUtility.SetAnimationEvents(clip, list.ToArray());
this.m_EventsSelected = new bool[list.Count];
this.m_DirtyTooltip = true;
}
}