private bool DrawEvent(AnimationEvent animationEvent, AnimationState containingState)
        {
            bool shouldDelete = false;

            EditorGUI.BeginChangeCheck();
            EditorUtilities.DrawHorizontal(() =>
            {
                EditorGUILayout.LabelField("name", GUILayout.Width(50f));
                animationEvent.name = EditorGUILayout.TextField(animationEvent.name);
            });
            EditorUtilities.DrawHorizontal(() =>
            {
                EditorGUILayout.LabelField("time", GUILayout.Width(50f));
                animationEvent.time = EditorGUILayout.Slider((float)animationEvent.time, 0f, containingState.Duration);
            });
            EditorUtilities.DrawHorizontal(() =>
            {
                GUILayout.FlexibleSpace();
                if (GUILayout.Button($"Delete '{animationEvent.name}'"))
                {
                    shouldDelete = true;
                }
            });
            if (EditorGUI.EndChangeCheck())
            {
                EditorUtilities.SetDirty(animationPlayer);
            }

            return(shouldDelete);
        }
 public void MarkDirty()
 {
     stateNamesNeedsUpdate = true;
     metaDataDrawer.usedClipsNeedsUpdate = true;
     EditorUtilities.SetDirty(animationPlayer);
 }