Skip to content

Conversation

@RandomShaper
Copy link
Member

@RandomShaper RandomShaper commented Dec 19, 2025

This fixes a nasty bug I've been having.

The issue can be reproduced as follows:

  1. Create the scene inheritance chain A -> B -> C.
  2. Put some kind of node in A with a subresource in a property. Save.
  3. Open C.
  4. Close A. Re-open A.
  5. Save C.

You'll see that C now contains a copy of the subresource in A.

The editor loads scenes ignoring the cache, but subresources must still use it, because otherwise loading a higher-level scene will cause new instances of its subresources to be created, while deeply derived scenes will keep pointing to the ones before the load of the top scene.

This PR adds separate cache control for subresources and leverages it in the code where the editor loads a scene.

I've tested and will keep testing, but of course this is slippery ground, so let's be careful. 😀


This PR is proudly donated by Pedrocorp.

@RandomShaper RandomShaper added this to the 3.x milestone Dec 19, 2025
@RandomShaper RandomShaper requested a review from a team as a code owner December 19, 2025 18:21
@RandomShaper RandomShaper force-pushed the single_subres_3.x branch 2 times, most recently from 47783f1 to 1bda028 Compare December 19, 2025 18:45
@RandomShaper RandomShaper requested a review from a team as a code owner December 19, 2025 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant