decentraland / decentraland/creator-hub

Possible entity ID overlap if scene is running

Open
#1,472 0 comments 0 reactions 0 assignees View on GitHub
3-low Bevy editor
Dominant language
TypeScript
Stars
7
Forks
14
Avg merge
2d 8h
Merged PRs (30d)
44

Description

If the scene is currently running, and generating new entities dynamically, and at the same time I drop a new entity via drag and drop from the asset packs, there's the (remote) possibility of the entity IDs overlapping.

This only happens occasionally and in pretty stess-tested scenarios, unlikely to happen in the wild.

In this test scene, the colored cubes and the circle particles are all generated with code. The circle particle system intentionally creates new entities instead of using a pool, to stress test this scenario.
If you drop an entity while the particles are running, occasionally this may happen on the same frame as a particle being generated, and you see a particle floating up instead of the item you placed.

You can see it happen in second 7 of this video
After this happens, hitting Stop refreshes the scene and it gets fixed
This does not affect the scene that is created, just the preview in the inspector

https://github.com/user-attachments/assets/fcf91357-35c7-437a-9e30-fecc3e6eed0a

Here's the scene from the video:
[Archive.zip](https://github.com/user-attachments/files/30798180/Archive.zip)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.