Skip to content

Commit

Permalink
Fix example in NodePath.get_name() documentation
Browse files Browse the repository at this point in the history
The output of `node_path.get_name(2)` is stated to be `Sprite`,
but the actual output is `Sprite2D`.
  • Loading branch information
krazy-j authored Nov 22, 2023
1 parent 923ef2b commit b359f8e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/classes/NodePath.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,13 @@
var node_path = NodePath("Path2D/PathFollow2D/Sprite2D")
print(node_path.get_name(0)) # Path2D
print(node_path.get_name(1)) # PathFollow2D
print(node_path.get_name(2)) # Sprite
print(node_path.get_name(2)) # Sprite2D
[/gdscript]
[csharp]
var nodePath = new NodePath("Path2D/PathFollow2D/Sprite2D");
GD.Print(nodePath.GetName(0)); // Path2D
GD.Print(nodePath.GetName(1)); // PathFollow2D
GD.Print(nodePath.GetName(2)); // Sprite
GD.Print(nodePath.GetName(2)); // Sprite2D
[/csharp]
[/codeblocks]
</description>
Expand Down

0 comments on commit b359f8e

Please sign in to comment.