fix: UrlReference triggering quantum change propagation, leading to exceptions with cyclic scene references #2528
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Details
A bit obtuse, but basically,
UrlReference
acted like actual object references, meaning that the editor loaded objects it referenced and added them for change propagation tracking. So, every time the project changed, e.g.: user-component reloading through assembly reloading, all scenes referenced received those changes even if closed.Some part of the engine does not expect two scenes to directly reference each other, it triggers the
SceneAssetCompiler
and fails here because those children are already in use - they cannot be assigned a new scene.This PR also introduces the
Id
property, it's non trivial to do without and it's already part of the YAML anyway, no reason not to include it in the binary I would think.You may also notice that
UrlReference
is now equivalent toAssetReference
, most callsite have duplicate logic to handle both, we could re-conciliate this in multiple ways:UrlReference
inherits fromAssetReference
, to do so, we would have to moveAssetReference
in a lower assembly, asUrlReference
cannot reference it from its assembly.AssetReference
withUrlReference
, we cannot do the opposite as users are already usingUrlReference
in their projects.Related Issue
None afaict
Types of changes
Checklist