static public void Play(Animator animator, Playable playable, PlayableGraph graph)
        {
            AnimationPlayableOutput playableOutput = AnimationPlayableOutput.Create(graph, "AnimationClip", animator);

            playableOutput.SetSourcePlayable(playable);
            playableOutput.SetSourceInputPort(0);
            graph.SyncUpdateAndTimeMode(animator);
            graph.Play();
        }
    public void ConnectTracksToPlayableGraph(AnimationClip clip, Animator anim)
    {
        AnimationPlayableOutput playableOutput = AnimationPlayableOutput.Create(timeline.pg, "Animation", anim);

        var clipPlayable = AnimationClipPlayable.Create(timeline.pg, clip);

        playableOutput.SetSourcePlayable(clipPlayable);
        playableOutput.SetSourceInputPort(0);
    }