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

Multi-scene inheritance does not update node properties beyond the second scene #60846

Open
stryker313 opened this issue May 7, 2022 · 3 comments

Comments

@stryker313
Copy link

stryker313 commented May 7, 2022

Godot version

4.0 Alpha 7

System information

Windows 10 Nvidia GTX 1060 Intel i5 4690k

Issue description

If you create a scene, instance this scene, save that scene, then instance that scene, save that scene,,,updates to the first scene will not propogate to scenes beyond the seconds

This video shows the issue

Untitled.mp4

I create "level1"
I save "level1" as a scene
I instance "level1" in a new scene
I save this scene as "level2"
I instance "level2" in a new scene
I save this scene as "level3"

In theory, any changes to "level1" should propogate to "level3" unless overriden by "level2"

However, if you make changes to "level1", it only propogates to "level2", ignoring "level3"

This is clearly demonstrated by collision layers on a character body, where in the video, you see I change collision layer 4 in "level1", and only "level2" inherits this change, while "level3" completely ignores it, despite the fact that "level3" inherits from "level1"

This issue plagues many properties, however, not all of them. For instance, adding new nodes to level1 will propogate to level3, however, certain node properties will not (in my experiecne, it has been collision layers, timer values, certain exported vars--> anything that is accessable via the editor)

Steps to reproduce

Create a scene using a characterbody3d as the base (scene1)
Save this scene (scene1)
Instance this scene into a new scene (scene2)
Save this scene (scene2)
Instance this scene into a new scene (scene3)
Save this scene(scene3)
Update a collision layer value in scene1
Only scene2 will inherit this cahnge

Minimal reproduction project

SubscriptionBug.zip

@lyuma
Copy link
Contributor

lyuma commented May 13, 2022

Can you check if draft PR #57606 addresses this bug?

It sounds like it is solving a similar problem.

@keptsecret
Copy link
Contributor

As far as I can tell, inheritance and instance update is checked in editor_data.cpp

@SamDevelopsCode
Copy link
Contributor

SamDevelopsCode commented Dec 9, 2023

This is still a problem in 4.2.

Initial values
Raycast3D - set to collision mask 1
Base - set to collision layer 1
Inherited - set to collision layer 1
Instance of Inherited - set to collision layer 1

Steps shown in gif:

All scenes have a collision layer set to 1.
Main scene is played showing the raycast is successfully detecting collision.
Change Base scene collision layer to 2.
You can now look at the Inherited scene collision layer is now also 2.
The instance in Main of InheritedScene should have a layer of 2 as well if changes propagate correctly and no value has been set to override but it does not work properly.
This is not expected behavior. An instance should change if no override is currently applied.

testing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To Assess
Development

No branches or pull requests

6 participants