Merge pull request #85240 from krazy-j/nodepath-get-name-documentation
Fix example in `NodePath.get_name()` documentation
This commit is contained in:
commit
91f0789efb
@ -121,13 +121,13 @@
|
|||||||
var node_path = NodePath("Path2D/PathFollow2D/Sprite2D")
|
var node_path = NodePath("Path2D/PathFollow2D/Sprite2D")
|
||||||
print(node_path.get_name(0)) # Path2D
|
print(node_path.get_name(0)) # Path2D
|
||||||
print(node_path.get_name(1)) # PathFollow2D
|
print(node_path.get_name(1)) # PathFollow2D
|
||||||
print(node_path.get_name(2)) # Sprite
|
print(node_path.get_name(2)) # Sprite2D
|
||||||
[/gdscript]
|
[/gdscript]
|
||||||
[csharp]
|
[csharp]
|
||||||
var nodePath = new NodePath("Path2D/PathFollow2D/Sprite2D");
|
var nodePath = new NodePath("Path2D/PathFollow2D/Sprite2D");
|
||||||
GD.Print(nodePath.GetName(0)); // Path2D
|
GD.Print(nodePath.GetName(0)); // Path2D
|
||||||
GD.Print(nodePath.GetName(1)); // PathFollow2D
|
GD.Print(nodePath.GetName(1)); // PathFollow2D
|
||||||
GD.Print(nodePath.GetName(2)); // Sprite
|
GD.Print(nodePath.GetName(2)); // Sprite2D
|
||||||
[/csharp]
|
[/csharp]
|
||||||
[/codeblocks]
|
[/codeblocks]
|
||||||
</description>
|
</description>
|
||||||
|
Loading…
Reference in New Issue
Block a user