Search Issue Tracker
By Design
Votes
0
Found in [Package]
1.3.8 - Entities
Issue ID
ECSB-1441
Regression
No
System Group Executes Only Once Per Frame when Not Using SystemAPI.GetSingletonRW or EntityManager.SetComponentData
Reproduction steps:
1. Open the attached “UpdateSystemGroup.zip” project
2. Open the “Assets/Scenes/SampleScene.unity” Scene
3. Enter the Play Mode
4. Press the W and E keys
5. Observe the Console window to confirm that the systems run 100 times for each system
6. Press the Q key
7. Observe the Console window
Expected result: Systems should trigger and log output 100 times for each system
Actual result: Systems run only once for each system
Reproducible with: 1.2.4 (2022.3.52f1), 1.3.8 (2022.3.52f1, 6000.0.29f1, 6000.1.0a7)
Reproducible on: Windows 11
Not reproducible on: No other environment tested
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
- UI Toolkit Dropdown list elements use default color instead of USS color override when hovering mouse over them
- BuildOptions.Development is ignored when running a batch mode build for the win64 buildTarget
- VisionOS Player Memory Usage continuously rises when the Player has a VisionOSVideoComponent running that is set to a URL Video
- Terms of Service agreement checkbox is invisible under specific OS system themes (UI Accessibility)
- Tile Palette: "Create New Tilemap" dropdown area is displayed in several colors
Resolution Note:
The package is behaving as designed. In an idiomatic foreach over an EntityQuery, the change versions of of the query's RW components are updated once in the loop preamble, not per loop iteration (or per RefRW.value write). This is to avoid unnecessary overhead in the overwhelmingly common case where the change version isn't changing over the course of the loop. If you want to force the change version to be updated for each loop iteration, you can use the approaches in the W and E loops as a workaround.
In general, due to the way EntityQuery instances are cached and shared between systems, the behavior of change versions and query filtering is significantly more difficult to reason about when a system is both reading/writing component data and also updating other systems, especially when the same EntityQuery is used by both the parent and child systems. For this reason, as a best practice to avoid confusion, we recommend that most ECS systems should either only manipulate component data or only update other systems.