Replies: 1 comment
-
I think the best way to run systems inside |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Feature Description
The
system
is a really good pattern to interact with the world and something all users learn.system
that run during the runtime of the app.startup_system
that runs during the startup-phase of the appThus I would like to propose a formalized concept of
build_system
that are run during the build phase of the app. End-result api could look something like pictured below:setup_system
to adhere to the same naming scheme)Context
The idea is primarily driven by my work over at #4947 where plugins like
bevy_winit
andbevy_render
has a lot of "custom code" during plugin setup that I would really like to abstract intosystems
. It would be very helpful if the entire plugin could be described by just a series of.add_build_system / .add_startup_system / .add_system
and not require that the user use direct world access to perform more esoteric operations during build. (Though that ability should not be taken away).It would be easier to reason about the plugin as a whole, but also more approachable for new contributors wanting to understand how everything works.
Alternatives
The
SystemState
api is awesome, so thanks to everyone who made that happen ❤️The following is my current approach to create "build systems" and it works, kinda, except a bit heavy on boilerplate and quickly run into borrow-checker shenanigans when combining with direct-world operations. (Maybe this is just me making mistakes)
Biggest limitation with doing this is that any commands queued up don't run before the start of the startup systems
Feedback Wanted
I'm both fairly new to Bevy and rust, so there might be obvious reasons why this isn't a good idea that I'm not seeing.
Beta Was this translation helpful? Give feedback.
All reactions