Move bevy_math
's implementations of Reflect
into bevy_math
#13456
Labels
A-Math
Fundamental domain-agnostic mathematical operations
A-Reflection
Runtime information about types
C-Feature
A new feature, making something new possible
D-Straightforward
Simple bug fixes and API improvements, docs, test and examples
What problem does this solve or what need does it fill?
Right now,
bevy_math
's implementations ofReflect
all live inbevy_reflect
behind an optional feature flag. The problem with this is that it relies on the fact that all of the reflected types so far have no private fields. Private fields are inaccessible frombevy_reflect
, so this organizational choice places limitations indirectly on data inbevy_math
.I ran into this limitation while working on curve-based animation.
What solution would you like?
bevy_math
should provide its ownReflect
implementations behind an optional dependency onbevy_reflect
. This makes more sense practically and organizationally, sincebevy_math
actually owns those types and has access to their private data.What alternative(s) have you considered?
Make all fields of all
bevy_math
types withReflect
public forever.The text was updated successfully, but these errors were encountered: