Topic was automatically imported from the old Question2Answer platform.
Asked By
John97
When you make an instance of a node in another scene, it contains a copy of all of the sub-nodes that were in its template, like a sprite. How do you access a node’s copy of that sub-node, it’s own sprite? It’s there, but it has no visible path.
I’m don’t know a better way but I just reference the instance and call get_node().
var size = self.get_node(Sprite)
Parse Error: At “get_node()” call, argument 1. The passed argument’s type (GDScriptNativeClass) doesn’t match the function’s expected argument type (NodePath).
When I use the name of the node instead of self
The identifier “name” isn’t declared in the current scope.
John97 | 2021-04-15 01:20
Write the path of the node as a string.
Bubu | 2021-04-15 01:23
Parse Error: The method “get_node” isn’t declared on base “String”.