#Plugin crate that runs in user-defined state

6 messages · Page 1 of 1 (latest)

sharp pier
#
pub struct MyExternPlugin;
impl Plugin for MyExternPlugin {
     fn build(&self, app: &mut App) {
         app.add_system_set(SystemSet::on_enter(/* User_defined_state */).with_system(...));
    }
}
```I'd like to separate a plugin to its own crate. How do I configure this plugin with a user-defined state as its run criteria? Also, more broadly, is there a way to pass a descriptor to configure the plugin?
glad lance
#

Look at what leafwing-input-manager does for now

#

This is kinda just a cursed problem though until we rework it at the engine level

glad lance
#

Yep. There's even an old version that took a state as a generic