diff --git a/examples/rhai/wrappers_rhai.rs b/examples/rhai/wrappers_rhai.rs index 691a1884..12f72397 100644 --- a/examples/rhai/wrappers_rhai.rs +++ b/examples/rhai/wrappers_rhai.rs @@ -20,13 +20,15 @@ use bevy_script_api::rhai::{ // Even though we are implementing Clone we are still able to reference the original data in script thanks to the script wrapper we are about to implement // Debug is nice to have, we can forward that implementation to Lua's ToString via our macro #[derive(Resource, Reflect, Default, Clone, Debug)] -#[reflect(Resource)] +#[reflect(Resource, RhaiProxyable)] pub struct MyThing { usize: usize, string: String, array: Vec, } +impl RhaiCopy for MyThing {} + impl MyThing { pub fn do_something_cool(&self) -> String { self.string.clone()