Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Registers required components with component id's#23129

Draft
Copyrighted wants to merge 1 commit intobevyengine:mainfrom
Copyrighted:register-required-components-with-component-ids
Draft

Registers required components with component id's#23129
Copyrighted wants to merge 1 commit intobevyengine:mainfrom
Copyrighted:register-required-components-with-component-ids

Conversation

@Copyrighted
Copy link
Contributor

Objective

Solution

  • Wrote function that takes in id's and registers the required components given id's.

Testing

WIP

  • Did you test these changes? If so, how?
  • Are there any parts that need more testing?
  • How can other people (reviewers) test your changes? Is there anything specific they need to know?
  • If relevant, what platforms did you test these changes on, and are there any important ones you can't test?

Showcase

This section is optional. If this PR does not include a visual change or does not add a new feature, you can delete this section.

  • Help others understand the result of this PR by showcasing your awesome work!
  • If this PR adds a new feature or public API, consider adding a brief pseudo-code snippet of it in action
  • If this PR includes a visual change, consider adding a screenshot, GIF, or video
    • If you want, you could even include a before/after comparison!
  • If the Migration Guide adequately covers the changes, you can delete this section

While a showcase should aim to be brief and digestible, you can use a toggleable section to save space on longer showcases:

Click to view showcase
println!("My super cool code.");

@alice-i-cecile alice-i-cecile added C-Feature A new feature, making something new possible A-ECS Entities, components, systems, and events S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged labels Mar 1, 2026
@github-project-automation github-project-automation bot moved this to Needs SME Triage in ECS Mar 1, 2026
let required_component = get_required_components_by_id(self, required_id);

unsafe {
self.components.register_required_components::<R>(self, requiree_component, required_component);
Copy link
Member

Choose a reason for hiding this comment

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

This structure is backwards. We should be defining the typed form in term of the untyped form :)

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-Feature A new feature, making something new possible S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged

Projects

Status: Needs SME Triage

Development

Successfully merging this pull request may close these issues.

Required components cannot be registered just with ComponentIds

2 participants