-
-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Registering a Bundle for Lua #105
Comments
Hi, the error message is right, the |
Yes I was mistaken. I suppose my question was more about spawning entities from within Lua but it doesn't look like there is support for that yet(?) I haven't had much time to look at the api gen code yet, but I plan to soon. |
I see, you're on the right track world::spawn works as you expect it to, methods.add_method("spawn", |_, world, ()| {
let mut w = world.write();
Ok(LuaEntity::new(w.spawn(()).id()))
}); |
After some further investigation, it seems like what I want is to use the world to spawn bundles ( Unfortunately ButtonBundle doesn't have Reflect trait required by the api generator. I am looking for some guidance on how to proceed, if it would be a good idea to generate wrappers for those without Reflect, e.g.
But there might be a better way I'm missing. |
Hi, so bundles are not currently supported since they are neither components or resources (these are the only types we can make references to via ReflectReference), And if the type doesn't support Reflect, we cannot attach a Since we do not have runtime type erased access to something like |
I am experimenting with bevy_mod_scripting, sorry for any confusion.
I want to display Text purely in Lua. Here's the code so far
I am having troubles figuring out how to create a
TextStyle
andTextSection
for use in mytest.sections
. Any ideas?The text was updated successfully, but these errors were encountered: