0 votes

When I reload a current scene, will this destroy the parenting?
A scene1 is the child of viewport, set dynamically in the code.
I reload the scene1. Is the parent still viewport?

Godot version 3.3.2
in Engine by (64 points)

2 Answers

0 votes

No, the parent will be whatever the original parent is in the scene file.

by (7,954 points)
+2 votes

Parent will be the same as its parent in the editor. If you have changed the parenting with codes then your parenting would be destroyed and it would again become same as the that in the editor

by (940 points)

Ok ty :) Furthermore Im saving the instances of the scenes in a dictionary in the global file but when I change the scene they're all null. Why is that so or how can I fix this?

Is the global file an autoloaded script?
If yes then all these will not be null.
If not then you need to set it again.

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.