pub trait AddScriptHost {
    // Required methods
    fn add_script_host<T: ScriptHost>(
        &mut self,
        schedule: impl ScheduleLabel
    ) -> &mut Self;
    fn add_script_host_to_set<T: ScriptHost>(
        &mut self,
        schedule: impl ScheduleLabel,
        set: impl SystemSet
    ) -> &mut Self;
}
Expand description

Trait for app builder notation

Required Methods§

source

fn add_script_host<T: ScriptHost>( &mut self, schedule: impl ScheduleLabel ) -> &mut Self

registers the given script host with your app, the given system set will contain systems handling script loading, re-loading, removal etc. This system set will also send events related to the script lifecycle.

Note: any systems which need to run the same frame a script is loaded must run after this set.

source

fn add_script_host_to_set<T: ScriptHost>( &mut self, schedule: impl ScheduleLabel, set: impl SystemSet ) -> &mut Self

Similar to add_script_host but allows you to specify a system set to add the script host to.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl AddScriptHost for App

source§

fn add_script_host_to_set<T>( &mut self, schedule: impl ScheduleLabel, set: impl SystemSet ) -> &mut Self
where T: ScriptHost,

source§

fn add_script_host<T>(&mut self, schedule: impl ScheduleLabel) -> &mut Self
where T: ScriptHost,

Implementors§