private void DrawRuntimeDebugData()
        {
            if (!Application.isPlaying)
            {
                return;
            }

            EditorGUILayout.LabelField("Current blend variable values:");
            var blendVars = animationPlayer.GetBlendVariables();

            EditorUtilities.DrawIndented(() =>
            {
                foreach (var blendVar in blendVars)
                {
                    EditorGUILayout.BeginHorizontal();
                    {
                        EditorGUILayout.LabelField(blendVar, GUILayout.Width(100f));
                        EditorGUILayout.LabelField(animationPlayer.GetBlendVar(blendVar).ToString());
                    }
                    EditorGUILayout.EndHorizontal();
                }
            });
            EditorUtilities.Splitter();

            if (!animationPlayer.gameObject.scene.IsValid())
            {
                //is looking at the prefab at runtime, don't attempt to draw the graph!
                return;
            }

            for (int i = 0; i < animationPlayer.GetStateCount(selectedLayer); i++)
            {
                EditorGUILayout.BeginHorizontal();
                {
                    string stateName = animationPlayer.layers[selectedLayer].states[i].Name;

                    if (GUILayout.Button($"Blend to {stateName} using default transition"))
                    {
                        animationPlayer.Play(i, selectedLayer);
                    }

                    if (GUILayout.Button($"Blend to {stateName} over .5 secs"))
                    {
                        animationPlayer.Play(i, TransitionData.Linear(.5f), selectedLayer);
                    }

                    if (GUILayout.Button($"Snap to {stateName}"))
                    {
                        animationPlayer.SnapTo(i, selectedLayer);
                    }
                }
                EditorGUILayout.EndHorizontal();
            }

            EditorGUILayout.LabelField("Playing clip " + animationPlayer.GetPlayingState(selectedLayer));
            for (int i = animationPlayer.GetStateCount(selectedLayer) - 1; i >= 0; i--)
            {
                EditorGUILayout.LabelField("Current weigth for state " + i + ": " + animationPlayer.GetStateWeight(i, selectedLayer));
            }
        }
        private void DrawRuntimeDebugData()
        {
            if (!Application.isPlaying)
            {
                return;
            }

            EditorGUILayout.LabelField("Current blend variable values:");
            var blendVars = animationPlayer.GetBlendVariables();

            EditorUtilities.DrawIndented(() =>
            {
                foreach (var blendVar in blendVars)
                {
                    EditorGUILayout.BeginHorizontal();
                    {
                        EditorGUILayout.LabelField(blendVar, GUILayout.Width(100f));
                        EditorGUILayout.LabelField(animationPlayer.GetBlendVar(blendVar).ToString());
                    }
                    EditorGUILayout.EndHorizontal();
                }
            });
            EditorUtilities.Splitter();

            if (!animationPlayer.gameObject.scene.IsValid())
            {
                //is looking at the prefab at runtime, don't attempt to draw the graph!
                return;
            }

            EditorGUILayout.LabelField("Playing clip " + animationPlayer.GetPlayingState(selectedLayer));
            for (int i = animationPlayer.GetStateCount(selectedLayer) - 1; i >= 0; i--)
            {
                EditorGUILayout.LabelField("Current weigth for state " + i + ": " + animationPlayer.GetStateWeight(i, selectedLayer));
            }
        }