Search Issue Tracker

Fixed

Fixed in 1.3.X - Entities, 7000.0.0a1

Votes

1

Found in [Package]

1.1.0-exp.1 - Entities

1.2.X

1.3.X - Entities

7000.0.0a1

Issue ID

ECSB-707

Regression

No

"EntityQueryDescValidationException: EntityQuery contains a filter with duplicate component type name A." is thrown when using WithPresent

Package: Entity Component System (ECS)

-

How to reproduce:
1. Open the attached project "Reproduce-WithPresent-SystemAPIQuery.zip"
2. Enter Play Mode

Expected results: No errors thrown in the Console window
Actual results: "EntityQueryDescValidationException: EntityQuery contains a filter with duplicate component type name A." is thrown

Reproducible with: 1.1.0-exp.1 (2022.3.11f1)
Could not test with: 1.0.16 (compilation errors in the Console window)

Reproducible on: Windows 11 22H2
Not reproducible on: No other environment tested

  1. Resolution Note (fix version 1.3.X - Entities):

    This was fixed in mid-October, and will appear in a forthcoming Entities patch release.

    Fixed in 1.3.8

Comments (1)

  1. ImmanuelScholz

    May 08, 2025 08:55

    This seems to be still partly broken in v1.3.8 for some combinations and some ordering of parameters. See official Unity Discord, channel #dots my Post

    Known Bug? The JobEntityGenerator creates broken DefaultQuery for "EnabledRefRW, ref"

    (links to discord is not allowed).

    basically:

    using Unity.Entities;

    struct Comp : IComponentData, IEnableableComponent { int i; }
    partial struct TestSystem : ISystem
    {
    [WithPresent(typeof(Comp))]
    partial struct JobWorks : IJobEntity
    { void Execute(ref Comp c, EnabledRefRW<Comp> ec) { } }

    [WithPresent(typeof(Comp))]
    partial struct JobBroken : IJobEntity
    { void Execute(EnabledRefRW<Comp> ec, ref Comp c) { } }
    }

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.