bevy_mod_scripting_core

Trait AddScriptHost

Source
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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so 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§