pub trait ManageStaticScripts {
// Required methods
fn add_static_script(&mut self, script_id: impl Into<ScriptId>) -> &mut Self;
fn remove_static_script(
&mut self,
script_id: impl Into<ScriptId>,
) -> &mut Self;
}
Expand description
Trait for adding static scripts to an app
Required Methods§
Sourcefn add_static_script(&mut self, script_id: impl Into<ScriptId>) -> &mut Self
fn add_static_script(&mut self, script_id: impl Into<ScriptId>) -> &mut Self
Registers a script id as a static script.
Event handlers will run these scripts on top of the entity scripts.
Sourcefn remove_static_script(&mut self, script_id: impl Into<ScriptId>) -> &mut Self
fn remove_static_script(&mut self, script_id: impl Into<ScriptId>) -> &mut Self
Removes a script id from the list of static scripts.
Does nothing if the script id is not in the list.
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.