public void SetEvents(AnimationEvent[] newEvents)
{
SerializedProperty property = this.Get("events");
if ((property != null) && property.isArray)
{
property.ClearArray();
foreach (AnimationEvent event2 in newEvents)
{
property.InsertArrayElementAtIndex(property.arraySize);
this.SetEvent(property.arraySize - 1, event2);
}
}
}