public static PlayableHandle PlayAnimatorController(Animator animator, RuntimeAnimatorController controller, out PlayableGraph graph) { graph = PlayableGraph.CreateGraph(); AnimationPlayableOutput animationPlayableOutput = graph.CreateAnimationOutput("AnimatorControllerPlayable", animator); PlayableHandle playableHandle = graph.CreateAnimatorControllerPlayable(controller); animationPlayableOutput.sourcePlayable = playableHandle; graph.SyncUpdateAndTimeMode(animator); graph.Play(); return(playableHandle); }