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

Split access model between components and resources #7255

Closed
alice-i-cecile opened this issue Jan 17, 2023 · 0 comments · Fixed by #14561
Closed

Split access model between components and resources #7255

alice-i-cecile opened this issue Jan 17, 2023 · 0 comments · Fixed by #14561
Labels
A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use

Comments

@alice-i-cecile
Copy link
Member

          Yes it would under this access model. We could split this between "read all components" and "reads all resources" but I'm not sure how that would interact with the bitsets. Happy to try to do this in this PR, or defer it until later.

Originally posted by @james7132 in #6960 (comment)

Currently reads_all and writes_all would access all resource and component data. This is not ideal, as EntityMut and EntityRef are much more useful if they can be accessed at the same time as resources.

@alice-i-cecile alice-i-cecile added A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use labels Jan 17, 2023
Shatur added a commit to projectharmonia/bevy_replicon that referenced this issue Apr 13, 2024
github-merge-queue bot pushed a commit that referenced this issue Aug 6, 2024
# Objective

- Fixes #13139
- Fixes #7255
- Separates component from resource access so that we can correctly
handles edge cases like the issue above
- Inspired from #14472

## Solution

- Update access to have `component` fields and `resource` fields

## Testing

- Added some unit tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant