Skip to main content

fire_plugin_events

Function fire_plugin_events 

Source
pub fn fire_plugin_events<H: ScriptHost + Resource<Mutability = Mutable>>(
    host: ResMut<'_, H>,
    pending: Res<'_, PendingPluginEvents>,
    out: MessageWriter<'_, ScriptCommandEvent>,
)
Expand description

Invoke the script’s handler once for each call collect_plugin_events gathered. Routing matches the fetch pipeline exactly: a per-key on(event, key, fn) registration wins, else the event’s fallback, and the key rides as the handler’s first argument ahead of the event’s own.