-
Notifications
You must be signed in to change notification settings - Fork 76
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
refactor!: update to bevy 0.8 and bevy_ecs_tilemap rewrite #106
Conversation
* add TilePos and GridCoords to tiles * add parenting to ldtk_entity * do clone-fu for texture handles
…v-dep Heron's not updated for 0.8 yet; ecs_tilemap got released, and the rewrite branch deleted.
Offset by zero for old behavior.
Cf. bevy_ecs_tilemap 6f08f100ba99e725d3326ef54ddc9d3f0da89876
- Can't construct `Parent` components anymore - Can't directly access .0 field on a `Parent` component (use `.get()`) - Can only assign parentage via commands The `worldly_adoption` system might benefit from using `EntityCommands.push_children()` instead of `add_children`, but for this pass I'm trying to keep the logic changes minimal.
Cargo check blows up without this, and it's one of those things where I'm like "wait why was it EVER working?"
As of Bevy 0.8, visibility gets propagated through the parent/child hierarchy much like global transforms do. Basically, whenever you would add Transform and GlobalTransform, you probably want to add the whole SpatialBundle.
A little bit of help on the refactor/tilemap-rewrite branch
I'm currently seeing 3 issues when updating to this branch:
|
Thanks for testing it out @NeoRaider !
I'm not able to reproduce this. Does your parent entity have a
Seems to be the same issue as #107. Using
I'm also not able to reproduce this. Using the same example from LDtk, I'm changing the |
Thanks, that was the issue - I was only adding
I'll try to reduce my code to a minimal reproducer. |
There seems to be a similar issue w/ hot reloading |
My rendering issue turned out to be bevyengine/bevy#5266. Inserting |
I've promoted the Hot reloading bug to its own issue, so I'm going to merge this PR. I'll make another PR for that fix when it's ready |
Thanks to @nfagerlund for the help with the bevy 0.8 update and lots of troubleshooting.
There's a couple extra major changes here worth pointing out
bevy_ecs_tilemap
doesn't really support it in the rewrite. This will probably allow us to simplify the level spawning code, but for now it works.SpatialBundles
and are all children of layer entities. Before, this was only true for tiles with intgrid values and metadata. This helps with despawning levels, but it also makes the hierarchy a little less confusing. It does compromise some performance though, since potentially thousands of entities will now have components that they didn't have before.