Closed hafiidz closed 1 year ago
Try adding .register_type::<Vec<String>>()
to your App
. Most of the time, a no registration found for type
error can be resolved like that.
Due to the fact that type registrations need to be manually monomorphized, Bevy simply opts not to register too many generic types itself. Instead, it relies on the user to register the ones they need. Eventually, this won't be as big an issue when https://github.com/bevyengine/bevy/pull/5781 lands.
Also as a side note, you can add #[reflect(default)]
to your fields to avoid having to define empty arrays in your RON file. You may already know that haha but just wanted to give that tip just in case you didn't.
Awesome, that helps greatly. Both the register_type
and #[reflect(default)]
advise is super helpful. Manage to get things working now. Totally forget about the default features, hehehe.
I am trying to create a schematic that is able to read the prototype.ron files that contains vector/arrays of String, pseudocode below"
Tried a few different variation but often encountered errors, such as
WARN bevy_asset::asset_server: encountered an error while loading an asset: RON error in "schematics/cardset/CardsetRoot.prototype.ron": 5:14: no registration found for type
alloc::vec::Vec<alloc::string::String>
Appreciate some advice on the right direction I need to explore further ya. Not sure where to refer.