-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Store resources as components on singleton entities (v2) #21346
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
Trashtalk217
wants to merge
19
commits into
bevyengine:main
Choose a base branch
from
Trashtalk217:resource-as-components-v2
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.
+850
−577
Open
Changes from 18 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
dd53970
Resources as components with ResourceComponent wrapper
Trashtalk217 449b132
deprecate get_valid_resource_id and get_resource_id
Trashtalk217 8c4269c
last simplification:
Trashtalk217 1d62f80
Revert "last simplification:"
Trashtalk217 96e758c
fix queued registration
Trashtalk217 54e5f10
catch bevy_scene up (not the tests)
Trashtalk217 a990c99
fixed most bevy_scene tests
Trashtalk217 1c27389
fixed bevy_render
Trashtalk217 233f967
fixed various tests behind feature flags
Trashtalk217 3e93e00
changed a test: MapEntities on resources is not possible right now
Trashtalk217 3f68bdc
updated example
Trashtalk217 ff679fe
removed internal import example
Trashtalk217 1a517f8
Apply suggestions from code review
Trashtalk217 d206bf8
made changes from code review
Trashtalk217 7298223
resource derives MapEntities by default
Trashtalk217 5718b34
avoid generic parameter name collision
Trashtalk217 4025a5e
fix tests
Trashtalk217 610d9ae
put resource entities behind a SyncUnsafeCell
Trashtalk217 4297457
Update crates/bevy_ecs/src/resource.rs
Trashtalk217 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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
get_valid_resource_id(resource_type_id)
and upgraded bevy, the function call would start returning unexpected results, correct? In that case, I think it would be better to remove this function completely instead of just deprecating it (users will have to change the code anyways).TypeId
and don't know the typeR
, is there still some way for me to check if it's registered? (for example, I could get the type IDs from iterating over the wholeTypeRegistry
registrations and checking forReflectResource
type data). If not, one option would be to add these function toReflectResource
.(the same applies to
get_resource_id
)Uh oh!
There was an error while loading. Please reload this page.
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.
I think you're right, but I'll leave it to a clean-up PR. I really want to start wrapping this up.