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§
sourcefn add_script_host<T: ScriptHost>(
&mut self,
schedule: impl ScheduleLabel
) -> &mut Self
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.
sourcefn add_script_host_to_set<T: ScriptHost>(
&mut self,
schedule: impl ScheduleLabel,
set: impl SystemSet
) -> &mut Self
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.