Skip to main content

bevy_mod_scripting_functions/
lib.rs

1#![allow(missing_docs)]
2
3pub mod core;
4pub use core::*;
5
6use bevy_app::{App, Plugin};
7use bevy_ecs::hierarchy::{ChildOf, Children};
8
9/// A plugin that registers the core scripting functions.
10#[derive(Default)]
11pub struct ScriptFunctionsPlugin;
12
13impl Plugin for ScriptFunctionsPlugin {
14    fn build(&self, app: &mut App) {
15        register_bevy_bindings(app);
16        register_core_functions(app);
17
18        // TODO: if bevy ever does this itself we should remove this
19        let world_mut = app.world_mut();
20        world_mut.register_component::<ChildOf>();
21        world_mut.register_component::<Children>();
22    }
23}