Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Scene Loading Persist Refactor #6858

Merged
merged 5 commits into from
Sep 2, 2022
Merged

Conversation

HexaField
Copy link
Member

Summary

This PR replaces the PersistTagComponent with an inverse concept. Previously, the way unloading scenes worked (particularly for portals) is we check for any entities with a PersistTagComponent, and unload everything else. This is problematic, as we have other reasons to reload the scene (such as receiving an update from the editor, or switching between scenes in the editor).

A more correct approach is instead to tag scene entities with components, and only unload them. This does mean that all entities created as a result of data loaded by the scene must have this component added or artefacts will persist between swtiching scenes, this can be abstracted into the entity tree, which represents the scene entities anyway.

References

closes #6853

Checklist

  • If this PR is still a WIP, convert to a draft
  • ensure all checks pass
  • When this PR is ready, mark it as "Ready for review"
  • Changes have been manually QA'd
  • Changes reviewed by at least 2 approved reviewer

QA Steps

List any additional steps required to QA the changes of this PR, as well as any supplemental images or videos.

@HexaField HexaField marked this pull request as ready for review September 2, 2022 00:42
@HexaField HexaField merged commit 56c9f7c into dev Sep 2, 2022
@HexaField HexaField deleted the scene-loading-persist-refactor branch September 2, 2022 01:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Scene reload after updating scene in editor does not restore others' avatars
1 participant