![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Newby |
i instanced a scene into my main scene and i want it to access the parent node my main scene with my instanced scene.
How can i do that
![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Newby |
i instanced a scene into my main scene and i want it to access the parent node my main scene with my instanced scene.
How can i do that
![]() |
Reply From: | kidscancode |
You can use get_parent()
for this.
However, note that this will cause a problem if you run the scene by itself, because it won’t have a parent. For that reason, it’s usually a good idea to avoid referencing a parent and use signals instead when you need to communicate “up” the tree. But that’s another topic…