mirror of
https://github.com/bevyengine/bevy.git
synced 2026-06-30 15:55:32 -04:00
6c0eb84e31
# Objective `bsn!` currently generates a lot of new types: one for each patch, which then get assembled into a single Scene impl by composing them in a tuple. This gives the compiler more work to do (types to verify, code to generate, etc). It also makes our debug symbols bigger / harder to read. ## Solution Combine `bsn!` entries, where possible, into a single `SceneFunction<F>` implementation of `Scene`, which does all of the "scene patch" logic internally. This significantly cuts down on codegen, and also makes the functional behavior of a `bsn!` block more clear when expanded.