godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.5k stars 20.26k forks source link

Editable subobjects issue #14995

Open Envalee opened 6 years ago

Envalee commented 6 years ago

Godot version:

Godot 3.0 Beta 2

OS/device including version:

Windows 10 64bit Intel i7 6700k MSI GeForce GTX 1060 (6GB) 16 GB RAM DDR4 Z170 Gaming Pro (Mainborad)

Issue description:

If changed a included (linked) scene in the editor node tree to "editable subobjects" and change something (for example a animatedSprite to another animation) and after that changing the included (linked) scene back to "NOT editable subobjects" then the editor keeps the changed animation (if not restarting) and ingame it is showing the default animation which isn´t changed.

Steps to reproduce:

  1. Create a new scene and use a "KinematicBody2D" as root node
  2. Add a "animatedSprite" Node as a child to the "KinematicBody2D"
  3. Add two animations (simple two different pictures with an animation-name)
  4. Save that scene for example as "charakter" or something
  5. Create another new scene and use a "Node2D" as root node
  6. add the created "charakter" scene two times as a child to the current "Node2D"
  7. activate on both included charakter scenes the "editable subobjects" option (rightclick on the charakter scene on the nodetree)
  8. Change the default animation from the "animationSprite" to the other animation (to see a difference)
  9. Deactivate the "editable subobjects" on only one included scene
  10. The changes are still there on both nodes in the editor but not ingame when the scene is started

Minimal reproduction project:

EditableSubobjectIssue.zip

Piet-G commented 6 years ago

Afaik this is still relevant in master, but this is incredibly useful as long as #20409 & #6455 are not fixed since this is the only way to prevent data loss after renaming/reparenting.

KoBeWi commented 4 years ago

We could fix this with soft-reload of the scene (something like what happens when the instanced scene is changed externally) when editable children are disabled. Not sure if it's worth it though. The instanced scene might be modified e.g. by a tool script and this is not reflected in game either. This issue is harmless and at most unexpected for the first time.

hilfazer commented 3 years ago

It looks like https://github.com/godotengine/godot/pull/46057 will fix this.