[Feature request]: Enable using .spawn_continuous_service via mut Command via proxy systems
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 72
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
Before proceeding, is there an existing issue or discussion for this?
- I have done a search for similar issues and discussions.
Description
Curently, .spawn_continuous_service can only be used through &mut App which is problematic for enabling services on a "per-need basis". E.G:
if you had a Service that dependent on a picking service:
pub struct PickingService(Service<(), ()>);
... inside a plugin init
let picking_service = self.spawn_continuous_service(
Update,
picking_service::<F>.configure(|config: ScheduleConfigs<ScheduleSystem>| {
config.in_set(SelectionServiceStages::Pick)
}),
);
You would either need a singleton plugin for this service ,or make a create a large resource that contains this service + a lot of other unrelated services.
to reduce .add_plugin spam and to allow initializing services via cascading FromWorlds, systems could be run within bevy_impulse via a proxy system that iterates over registered app schedules(similar to type registry) and runs systems via SystemIds.
E.G: Something along the lines of this example:
https://github.com/rydb/bevy_proxy_system/blob/main/src/main.rs
Implementation Considerations
No response
Alternatives
No response
Additional information
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No project files or tests are named. Start by reading the current spawn_continuous_service API and the linked bevy_proxy_system example, then trace how App schedules and SystemIds are handled. Done should support the requested per-need service initialization through a bevy_impulse proxy without requiring access through &mut App.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100