Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing the type of the root node can wipe the whole scene tree in certain cases #78372

Closed
ajreckof opened this issue Jun 17, 2023 · 4 comments · Fixed by #89447
Closed

Changing the type of the root node can wipe the whole scene tree in certain cases #78372

ajreckof opened this issue Jun 17, 2023 · 4 comments · Fixed by #89447

Comments

@ajreckof
Copy link
Member

Godot version

v4.1.beta.custom_build [b5f0ca1e5]

System information

macOS 13.3.0 - Vulkan (Forward+) - integrated Apple M1 Pro - Apple M1 Pro (8 Threads)

Issue description

So if you have a scene that contains a instanced child scene that has a script on its root node, and you change the type of its root node then the whole scene tree gets deleted.

Enregistrement2.mp4

For now I could not find any workaround that would not lose data.

Steps to reproduce

  1. Create two scene
  2. add a script to the root node of one and instanciate the same one into the other
  3. change the type of the root of the second one

Minimal reproduction project

Start at step 3 with MRP
Test.zip

@nulflux
Copy link

nulflux commented Sep 7, 2023

I just lost my entire days work on a character rig just like this. Undo did nothing. I tried to play the scene, it saved the scene, now it won't ever come back. Laaaame.

@ajreckof
Copy link
Member Author

So I came back to this and I have a better understanding of what is happening now and thus better reproduction step. But now they are causing a crash but preventing the crash with an error macro will pop the same errors as before hence this is the same bug. What is happening is you have a scene instantiated in another scene. Then if you do any modification on the on ethat is instantiated (not just script as I thought before) and save the scene and then you go back to the other scene the second scene needs to rebuild to account for the modification in the instantiated scene. The problem is it was not properly made which broke the signal connection that is doing the link when you change the root node type. Hence when you try to replace the root node type the editor will lose traces of the new root.

@ElnuDev
Copy link

ElnuDev commented Aug 8, 2024

This is still an issue, any news on this?

2024-08-07.19-44-56.mp4

@akien-mga
Copy link
Member

@ElnuDev This was fixed in 4.3 (see the milestone on the issue), and you're using 4.2.2, so it's expected that it's not fixed in your case.

@akien-mga akien-mga changed the title changing the type of the root node can wipe the whole scene tree in certain cases Changing the type of the root node can wipe the whole scene tree in certain cases Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants