From cb7fdad3b4377bfa2bf866302e2e788c8a03ece8 Mon Sep 17 00:00:00 2001 From: Violet Johnson Date: Wed, 8 Mar 2023 08:37:26 +0000 Subject: [PATCH] Update C# code example to fix an error Update doc/classes/AnimationNodeStateMachinePlayback.xml Co-authored-by: Raul Santos --- doc/classes/AnimationNodeStateMachinePlayback.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/classes/AnimationNodeStateMachinePlayback.xml b/doc/classes/AnimationNodeStateMachinePlayback.xml index 48d4f154d1f..85dea7a4c26 100644 --- a/doc/classes/AnimationNodeStateMachinePlayback.xml +++ b/doc/classes/AnimationNodeStateMachinePlayback.xml @@ -12,7 +12,7 @@ state_machine.travel("some_state") [/gdscript] [csharp] - var stateMachine = GetNode<AnimationTree>("AnimationTree").Get("parameters/playback") as AnimationNodeStateMachinePlayback; + var stateMachine = GetNode<AnimationTree>("AnimationTree").Get("parameters/playback").As<AnimationNodeStateMachinePlayback>(); stateMachine.Travel("some_state"); [/csharp] [/codeblocks]