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

fix: UrlReference triggering quantum change propagation, leading to exceptions with cyclic scene references #2528

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Eideren
Copy link
Collaborator

@Eideren Eideren commented Nov 22, 2024

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 to AssetReference, most callsite have duplicate logic to handle both, we could re-conciliate this in multiple ways:

  • Either UrlReference inherits from AssetReference, to do so, we would have to move AssetReference in a lower assembly, as UrlReference cannot reference it from its assembly.
  • Or we replace AssetReference with UrlReference, we cannot do the opposite as users are already using UrlReference in their projects.

Related Issue

None afaict

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My change requires a change to the documentation.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have built and run the editor to try this change out.

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