-
Notifications
You must be signed in to change notification settings - Fork 78
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
Level spawns twice when LdtkWorldBundle
spawns after LevelSelection
is inserted
#91
Comments
Thanks for the report, I'm able to reproduce the issue. |
This issue was causing me some problem with my collision detection code. The duplicate entities was messing with my collision resolution, so I did some digging. In It's worth noting that it should have despawned the entities from the first pass but failed to do so because the children didn't exist on the asset. |
I see, thanks for looking into this. I think that change might introduce a regression where new Maybe it would be better to just ensure that there are no duplicates in the Would that resolve your issue as well @beardedmullett ? |
The query and the event seem to occur a frame apart, certainly separate calls to |
The currently selected level spawns twice if
LevelSelection
already exists as a resource, andLdtkWorldBundle
is spawned after startup. See the following example (given somegame.ldtk
):The same thing happens when
LevelSelection
is instead inserted in thespawn_world_bundle
system.However, this does not happen when
LevelSelection
is first inserted later on, i.e. with a system such as:The text was updated successfully, but these errors were encountered: