I'm working on something where I ran into a similar issue to what's reported here: https://github.com/makspll/bevy_mod_scripting/issues/479
Basically, I want to access resources like ResMut<Assets<StandardMaterial>> from Lua scripts. Looking under the hood of the get_type_by_name method in Lua, it appears to be backed by the Bevy TypeRegistry struct in bevy_reflection. Specifically the method resolves to get_with_short_type_path and some similar functions. (Code, docs on the latter).
I tried the first "obvious" solution, which was to add .register_type::<Assets<StandardMaterial>>() to the construction of my App, but that failed because the type lacks the trait GetTypeRegistration. I'm not sure where to go from here--is it even possible to do this with bevy_mod_scripting?
#bevy_mod_scripting: Accessing Assets<StandardMaterial> in scripts
3 messages · Page 1 of 1 (latest)
@robust walrus I hope you don't mind me pinging you on this--I'm curious if you think it's possible to do this! And thanks for your work on making this crate 🙂
Issue has been thoroughly addressed in GH, thank you! https://github.com/makspll/bevy_mod_scripting/issues/479