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

Add custom schedule example #11527

Merged
merged 3 commits into from Jan 25, 2024

Conversation

Malax
Copy link
Contributor

@Malax Malax commented Jan 25, 2024

Objective

Fixes #11411

Solution

  • Added a simple example how to create and configure custom schedules that are run by the Main schedule.
  • Spot checked some of the API docs used, fixed App::add_schedule docs that referred to a function argument that was removed by Move schedule name into Schedule #9600.

Open Questions

  • While spot checking the docs, I noticed that the Schedule label is stored in a field called name instead of label. This seems unintuitive since the term label is used everywhere else. Should we change that field name? It was introduced in Move schedule name into Schedule #9600. If so, I do think this change would be out of scope for this PR that mainly adds the example.

Copy link
Contributor

The generated examples/README.md is out of sync with the example metadata in Cargo.toml or the example readme template. Please run cargo run -p build-templated-pages -- update examples to update it, and commit the file change.

@Malax
Copy link
Contributor Author

Malax commented Jan 25, 2024

I think the comment above is inaccurate. I fixed the issue in 218e570, before CI failed. Running the command again results in an empty changeset.

@alice-i-cecile alice-i-cecile added A-ECS Entities, components, systems, and events C-Examples An addition or correction to our examples A-App Bevy apps and plugins labels Jan 25, 2024
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.

Looks great! Agreed on the change suggested, and agreed it should be its own PR.

@alice-i-cecile alice-i-cecile added this pull request to the merge queue Jan 25, 2024
@alice-i-cecile alice-i-cecile 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 Jan 25, 2024
Merged via the queue into bevyengine:main with commit 79b4f26 Jan 25, 2024
30 checks passed
github-merge-queue bot pushed a commit that referenced this pull request Jan 25, 2024
# Objective

While working on #11527 I spotted that the internal field for the label
of a `Schedule` is called `name`. Using `label` seems more in line with
the other naming across Bevy.

## Solution

Renaming the field was straightforward since it's not exposed outside of
the module. This also means a changelog or migration guide isn't
necessary.
tjamaan pushed a commit to tjamaan/bevy that referenced this pull request Feb 6, 2024
# Objective

Fixes bevyengine#11411

## Solution

- Added a simple example how to create and configure custom schedules
that are run by the `Main` schedule.
- Spot checked some of the API docs used, fixed `App::add_schedule` docs
that referred to a function argument that was removed by bevyengine#9600.

## Open Questions

- While spot checking the docs, I noticed that the `Schedule` label is
stored in a field called `name` instead of `label`. This seems
unintuitive since the term label is used everywhere else. Should we
change that field name? It was introduced in bevyengine#9600. If so, I do think
this change would be out of scope for this PR that mainly adds the
example.
tjamaan pushed a commit to tjamaan/bevy that referenced this pull request Feb 6, 2024
# Objective

While working on bevyengine#11527 I spotted that the internal field for the label
of a `Schedule` is called `name`. Using `label` seems more in line with
the other naming across Bevy.

## Solution

Renaming the field was straightforward since it's not exposed outside of
the module. This also means a changelog or migration guide isn't
necessary.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-App Bevy apps and plugins A-ECS Entities, components, systems, and events C-Examples An addition or correction to our examples 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.

Add an example demonstrating how to modify the main schedule order
3 participants