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

Map entities from a resource when written to the world. #13650

Merged
merged 4 commits into from
Jun 3, 2024
Merged

Map entities from a resource when written to the world. #13650

merged 4 commits into from
Jun 3, 2024

Conversation

brandon-reinhart
Copy link
Contributor

@brandon-reinhart brandon-reinhart commented Jun 3, 2024

Objective

Solution

  • Resources can reflect(MapEntitiesResource) and impl MapEntities to get access to the mapper during the world insert of the scene.

Testing

  • A test resource_entity_map_maps_entities confirms the desired behavior.

Changelog

  • Added reflect(MapEntitiesResource) for mapping entities on Resources in a DynamicScene.

fixes 10958

Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Useful functionality, tightly scoped, with tests to validate that it works. Code quality is fine, you have my approval.

Like I said in the comment, I think we're out of luck for merging the two related types.

@alice-i-cecile alice-i-cecile added this to the 0.14 milestone Jun 3, 2024
@alice-i-cecile alice-i-cecile added C-Bug An unexpected or incorrect behavior A-Reflection Runtime information about types A-Scenes Serialized ECS data stored on the disk M-Needs-Release-Note Work that should be called out in the blog due to impact labels Jun 3, 2024
@alice-i-cecile
Copy link
Member

I've added the S-Needs-Release-Note label here: I think that this is a high enough impact bug / limitation that it's worth calling out in a simple note so people can remove their workarounds.

@MrGVSV MrGVSV added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Jun 3, 2024
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Jun 3, 2024
Merged via the queue into bevyengine:main with commit 7570c9f Jun 3, 2024
32 checks passed
@alice-i-cecile
Copy link
Member

Thank you to everyone involved with the authoring or reviewing of this PR! This work is relatively important and needs release notes! Head over to bevyengine/bevy-website#1330 if you'd like to help out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Reflection Runtime information about types A-Scenes Serialized ECS data stored on the disk C-Bug An unexpected or incorrect behavior M-Needs-Release-Note Work that should be called out in the blog due to impact S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ReflectMapEntities on Resources
3 participants