0 votes

I have this instanced scene in my main scene, but when i try to get te root node of the main scene through a script that's attached to the instanced scene it returns the root of the instanced scene instead of the actual root. Why is this?

PS: I've tried every sensible method of getting the root

Example tree (actual):
root
- cube
- light
- player (instanced scene) with script
- |- Meshinstance or smth
- |- Camera or smth

the tree the script returns:
- player
- | - Meshinstance or smth
- | - Camera or smth

Godot version 3.0
in Engine by (12 points)

1 Answer

0 votes

Have you tried get_tree().get_root()?

by (7,190 points)

Yup. I've tried all of those methods.

That's strange. You are using 3.2.3 right?

I think so. I've just installed the newest version not long ago.
Edit: Just checked, i do indeed have 3.2.3

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 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 webmaster@godotengine.org with your username.