Skip to content

Preserve asset and scene registry entry order on update #2

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ahmed-shariff
Copy link

Fix for liris-xr/PLUME-Recorder#18

This commit updates the asset and scene GUID registry population to maintain the original order of entries when reconstructing registries. Previously, entry order could change due to the data population approach, causing unnecessary asset rewrites and unstable scene registry updates (especially on build or play mode changes). Now, entries that already exist in the previous registry are added first in their existing order, followed by new entries.

Updates the API to use TryGetEntry instead of TryGetValue for consistency.

In liris-xr/PLUME-Recorder#18 I had proposed using GetHashCode. Turns out that is not reliable - under the hood, it uses GetInstanceID, which changes from session to session.

This commit updates the asset and scene GUID registry population to
maintain the original order of entries when reconstructing
registries. Previously, entry order could change due to the data
population approach, causing unnecessary asset rewrites and unstable
scene registry updates (especially on build or play mode
changes). Now, entries that already exist in the previous registry are
added first in their existing order, followed by new entries.

Updates the API to use TryGetEntry instead of TryGetValue for
consistency.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant