bevy icon indicating copy to clipboard operation
bevy copied to clipboard

Clean up one-shot systems API

Open benfrankel opened this issue 1 year ago • 2 comments

There are a few inconsistencies and gaps in the current one-shot systems API:

  • There should be a Commands::unregister_system_cached method
  • Commands:: and World::run_system_with_input should be renamed to run_system_with for consistency
  • Commands:: and World::run_system_once_with should accept (system, input) in that order rather than (input, system) for consistency

benfrankel avatar Nov 24 '24 22:11 benfrankel

Hi, I haven't contributed yet, and would like to tackle this issue. Cheers.

pemattern avatar Nov 26 '24 06:11 pemattern

This is scope creep, but I'd like to propose that the common functionality between World and Commands for running one-shot systems be broken out into a trait. Ever since 0.13, it's not been possible to access Command objects directly for the built-in APIs, including the one-shot systems API, and therefore they cannot be passed around as deferred operations.

spectria-limina avatar Dec 02 '24 06:12 spectria-limina