-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Register some extra types to type registry #8430
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
Register some extra types to type registry #8430
Conversation
|
Yet another case that might have been resolved via #5781. |
MrGVSV
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks for this!
Indeed. Can't wait for that amazing feature to land one day! |
Yeah, that PR is ready. Just kinda waiting on review now. Especially since it's been deemed controversial. |
|
Could someone explain to me what the purpose of registering types in the type registry is? I added the CSS Grid types because all the other style types seemed to be added. But I wasn't sure why as it compiled just fine without me registering the types. |
@nicoburns it's pretty much for reflection and serialization. The registry holds type information which can be used at runtime to do things dynamically. But it's also (and most importantly) used to serialize and deserialize types using reflection. Additionally, it's needed in scenes in order to both deserialize and actually create/apply the contained components (using More details can be found on the docs. |
Objective
Fixes #8415.
Solution
I simply added the missing types to the type registry.
Changelog
Added
#[reflect(Component]tobevi_ui::ui_node::ZIndex, since it implsComponentandReflect.The following types have been added to the type registry:
bevy_ui::ZIndexbevy_math::Rectbevy_text::BreakLineOnbevy_text::Text2dBounds