-
Notifications
You must be signed in to change notification settings - Fork 28
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
Update to bevy 0.15 #44
Conversation
I think the library is ready now, I just need to go through the examples and update them to the new component structure. The main thing I had to adjust is the way Handles are represented in components; while I was there, I deprecated the Bundles and added Component dependencies.
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.
Thanks for tackling this. I took a quick look what's done until now, and it looks pretty much fine for me.
I'm a bit out of the Bevy loop right now, so i'm not exactly sure what could be the problem here. The only thing coming to my mind, while looking at the Bevy release post, is the change from the immediate render world to the retained one. Maybe we're breaking the link between the main world and render world entities in svg_mesh_linker
by only replacing the mesh and not also updating the link.
I don't know how the MainEntity
component and RenderEntity
component are synced via SyncToRenderWorld
, but my guess is, that we are breaking it when we replace the Svg entity required component Mesh
with the asset Mesh
that was loaded with the asset loader.
#[cfg(all(feature = "2d", feature = "3d"))] | ||
type WithMesh = Or<(With<Mesh2dHandle>, With<Handle<Mesh>>)>; | ||
type WithMesh = Or<(With<Mesh2d>, With<Mesh3d>)>; | ||
|
||
/// Checkes if a "new" SVG bundle was added by looking for a missing `OriginState` | ||
/// and then adds it to the entity. | ||
pub fn add_origin_state( |
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.
I think, we need this only for backwards compatibility with Bundle
s and not anymore for the new required components approach, which should automatically add the default Origin
. So let's at least leave a //INFO:
, or something like that here to remind us to remove this later on.
I unfortunately don't know what I'm doing past this point; if anyone else wants to contribute to fix up what's left, go for it. |
Was picked up and merged in #46 |
Closes #45.
The main thing I had to adjust is the way
Handle
s are represented withinComponent
s (since they themselves are no longer components as of 0.15); while I was there, I deprecated theBundle
s and addedComponent
dependencies (#[require()]
).IN PROGRESS NOTE: All the compile errors have been removed, but nothing is rendering still. I'm wondering if it has anything to do with Bevy changing how Materials work in 0.15; I haven't fully diagnosed what to change though. If anyone would like to help with debugging this, let me know; this is a very foreign codebase to me, so while I think I did everything right to migrate correctly, it's possible I missed something.