Skip to content

Panic-less version of World::run_schedule #8018

Closed

Description

@ItsDoot

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

As of #7911, Bevy no longer panics when a system is added to a schedule that doesn't exist yet. However, that's only for adding systems, not running them.

What solution would you like?

A version of World::run_schedule that returns a Result rather than panic, likely called World::try_run_schedule.

What alternative(s) have you considered?

Check the Schedules resource for an existing schedule before running it.

Additional Context

Ran into this issue during #7936.

Activity

  1. added
    C-FeatureA new feature, making something new possible
    S-Needs-TriageThis issue needs to be labelled
    on Mar 10, 2023
  2. added
    D-TrivialNice and easy! A great choice to get started with Bevy
    A-ECSEntities, components, systems, and events
    and removed
    S-Needs-TriageThis issue needs to be labelled
    on Mar 10, 2023
  3. alice-i-cecile commented on Mar 10, 2023

    @alice-i-cecile
    Member

    Remember to check and replace internal usages too after adding this method :)

  4. added this to the 0.11 milestone on Mar 16, 2023
  5. cart commented on Mar 17, 2023

    @cart
    Member

    Relevant: #8079 (comment)

    If we're going to embrace this pattern we really need to remove the warnings here. I'm removing them in that PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ECSEntities, components, systems, and eventsC-FeatureA new feature, making something new possibleD-TrivialNice and easy! A great choice to get started with Bevy

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions