bevyengine / bevyengine/bevy

Tracking: Take advantage of `ComponentId`'s being discoverable before registration

Open
#18,184 0 comments 0 reactions 0 assignees View on GitHub
A-ECS C-Feature C-Tracking-Issue
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## What problem does this solve or what need does it fill?

Lots of planned and wishlist features require (or would benefit from) knowing a component or resource's `ComponentId` before it is registered. Effectively, we can reserve an id with only `&Components` and know that the id will be the same id it receives when registered. Further, we can also queue a registration to happen with only `&Components`, which provides additional flexibility.

This is very useful for assets as entities (#11266), multi-world bevy, readonly queries and other readonly system parameters, pre-registering components, scripting, (and probably more).

## History

This is a better alternative for #18155.

## Roadmap

- [x] Decouple registration from storage. See #17671.
- [x] Implement queued registration. See #18173.
- [ ] #18276
- [ ] Allow creating and running read-only systems with only `&World`.
- [ ] Remove `try_query` API (no longer needed).

After #18173, parallel work may begin on components as entities and assets as entities.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.