Search Issue Tracker

Won't Fix

Won't Fix in 1.0.X

Votes

0

Found in [Package]

1.0.8 - Entities

Issue ID

ECSB-397

Regression

Yes

EntityQuery.SetChangedVersionFilter() is adding filters to multiple EntityQuery objects when EnityQuery objects have the same ComponentType parameter

Package: Entity Component System (ECS)

-

Reproduction steps:
1. Open the attached project “EntityQueryBug“
2. Enter the Play Mode
3. Observe the Console window

Expected result: EntityQuery “Query_NoFilter” has no filter
Actual result: The filter is added to both EntityQuery objects

Reproducible with: 1.0.0-exp.8 (2022.2.21f1, 2023.1.0b18, 2023.2.0a16), 1.0.8 (2022.2.21f1, 2023.1.0b18, 2023.2.0a16)
Not reproducible with: 0.51.1-preview21 (2020.3.48f1, 2021.3.26f1)

Reproducible on: Windows 11

  1. Resolution Note:

    There are no fixes planned for this Bug

  2. Resolution Note (1.0.X):

    This behavior is expected and working as designed. Each system maintains a cache of the EntityQuery objects it creates, and queries created within a single system with the same query description will return a reference to the previously-cached EntityQuery object instead of creating a new instance. Other Entities features rely on this behavior.

    This is definitely a regular source of confusion, and we're investigating a set of design changes that would allow us to eliminate this behavior, but this change is unlikely to happen within the Entities 1.x timeframe.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.