Search Issue Tracker
By Design
Votes
0
Found in [Package]
0.5.0-prev.17, 0.5.1-prev.11
Issue ID
1218417
Regression
No
[ECS] Subscene DestroyEntity with LinkedEntityGroup fails to clean up and throws error on exiting Play mode
How to reproduce:
1. Open attached project "EcsTextureAtlas.zip" and scene "SampleScene"
2. Enter Play mode
3. Exit Play mode
4. Observe Console window (might need to repeat the steps 2 and 3 multiple times)
Expected result: no errors are thrown
Actual result: "ArgumentException: DestroyEntity(EntityQuery query) is destroying entity Entity(29:1) which contains a LinkedEntityGroup and the entity Entity(29:1) in that group is not included in the query" is thrown
Reproducible with: 2019.3.1f1, 2020.1.0a23 (0.5.0-prev.17, 0.5.1-prev.11)
Could not test with: 2017.4, 2018.4 (due to package errors in the console window)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [Android][Vulkan] Crash on /system/lib/libandroid.so (ANativeWindow_setBuffersGeometry+4) when the Vulkan Graphics API is used
- Event handlers are preventing operations when trying to copy or paste HTML text in the WebGL Player
- [macOS] Crash on __pthread_kill when Exporting a Package while another export is in progress
- Crash on TransformAccessDestroyCallback when removing a URP Decal Projector component from a parent GameObject that had a URP Decal Projector child GameObject
- An added component is being removed form the prefab when reimporting the prefab
Resolution Note:
The behavior is unfortunate, but expected. The error happens when exiting playmode, because that disables a subscene component which means that it will unload itself. The subscene contains entities that a system will add additional entities to and store them in a LinkedEntityGroup. The entity in the subscene describes what text to render and the system creates entities for the text rendering (or similar). The LinkedEntityGroup in this case is probably used because this allows you to disable the root and it will disable the rest. This is not the intended usage of LinkedEntityGroup. Entities in a linked group must be part of the same subscene section.