pub trait AppSceneTreeExt {
// Required methods
fn register_scene_tree_component<C>(&mut self) -> &mut Self
where C: Component + Default;
fn register_scene_tree_component_with_init<C, F>(
&mut self,
init_fn: F,
) -> &mut Self
where C: Component,
F: Fn(&mut EntityCommands<'_>, &mut GodotNode<'_, '_>) + Send + Sync + 'static;
}Expand description
Extension trait for App to register scene tree components
Required Methods§
Sourcefn register_scene_tree_component<C>(&mut self) -> &mut Self
fn register_scene_tree_component<C>(&mut self) -> &mut Self
Register a component to be added to all scene tree entities with default value
Sourcefn register_scene_tree_component_with_init<C, F>(
&mut self,
init_fn: F,
) -> &mut Self
fn register_scene_tree_component_with_init<C, F>( &mut self, init_fn: F, ) -> &mut Self
Register a component with custom initialization logic that has access to the Godot node
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".