-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Scene entity map when saving scene #22369
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
molikto
wants to merge
12
commits into
bevyengine:main
Choose a base branch
from
molikto:scene-entity-map
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+135
−5
Open
Changes from 7 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
bf223df
w
molikto 29f3c4b
w
molikto 5ddaf09
fix
molikto b71824e
fmt
molikto b875d38
lint
molikto ba7b1b2
fix
molikto 074668c
Merge branch 'main' into my/scene-entity-map
molikto 4590cb6
Merge remote-tracking branch 'origin/main' into my/scene-entity-map
molikto 8dac6da
Update crates/bevy_scene/src/dynamic_scene_builder.rs
molikto 50ac95d
Merge branch 'scene-entity-map' of github.com:molikto/bevy into my/sc…
molikto 0e6392d
remove redundant assert
molikto 7a49f9d
update doc
molikto File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Not sure if anyone is a fan of too verbose names, but I wonder if the name
world_to_scene_entity_maporworld_to_scene_mapwould be better here. I appreciate how succinctentity_mapis though, so I may be in the minorityThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
entity_mapis a private field, so it's naming is less important compared to the public fn. I updated the doc ofwith_entity_mapin 7a49f9d so it's more clear that we expect a world -> scene map.Also
write_to_worlddoesn't say it's a scene -> world entity map. (maybe because this is this is the only direction we considered before this PR). If we want to change, it's better we change in both places.I also feel user might be confused, because they need to manually create a revert map if they want to use this new API correctly. But I also don't feel super good (and not sure how) to create more guardrail abstractions to make it less confusing.
Another option is use scene -> world map in
with_entity_map, but this meansDynamicSceneBuilderneed to create the revert map inside itself. Also not sure if this is good.