0 votes

I have written codes like this:

var p = debug.PLAYER # PLAYER is a node I got by assigning with self keyword
p.global_position = get_parent().get_node("spawnPoint").global_position

For instantiating nodes:

var ref_node = debug.node
var child_node = ref_node.instance()

But I want a better way because the follow doesn't work:

var child_node = debug.node.instance()

It returns an error, something like "instance function doesn't exists in debug singleton"

in Engine by (682 points)

Could you give us the full error text produced?
Please and thanks.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.