You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The only issue with this is specifying when the templates get updated.
Presumably users would spawn an entity with a template component, and then there would be a system that each frames iterates over all template entities and re-runs the template build. However users probably want control over when those systems run.
Probably you could have a system for each of the built-in schedules (Update, PostUpdate, etc), and then have people parameterize their template component like struct AutoBuildingTemplate<S: ScheduleLabel> { template: Template }. Each system can then iterate only over the matching components.
For more manual control over scheduling and system ordering, users could add their own systems like they do now.
The other issue actually is that AutoBuildingTemplate won't have access to any system params for reading ECS data.
Potentially instead of storing a Template directly, it should store Box<dyn Fn(&World) -> Template>, and the templates get updated in an exclusive system. That's how I've done it in bevy_dioxus and similar.
From https://discord.com/channels/691052431525675048/1318745402199113859/1318794634817962007
The text was updated successfully, but these errors were encountered: