Reload current scene destroys parenting?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Luftensteiner

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?

:bust_in_silhouette: Reply From: exuin

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

:bust_in_silhouette: Reply From: Help me please

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

Ok ty :slight_smile: 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?

Luftensteiner | 2021-07-28 06:58

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.

Help me please | 2021-07-28 07:15