Back to Bevy

Reflect Struct QOL

_release-content/migration-guides/reflect_struct_qol.md

0.19.0429 B
Original Source

bevy_reflect::DynamicStruct::index_of was moved to the bevy_reflect::Struct trait and is now bevy_reflect::Struct::index_of_name. Most utility methods already existed on Struct, except for the method to get a fields index by name.

The bevy_reflect::FieldIter iterator had its items changed, from &dyn PartialReflect to a tuple of (&str, &dyn PartialReflect), so that you can iterate the names alongside the fields.