Search Unity

ComponentGroup(Query) Filter not working

Discussion in 'Data Oriented Technology Stack' started by nttLIVE, Oct 9, 2018.

  1. nttLIVE

    nttLIVE

    Joined:
    Sep 13, 2018
    Posts:
    77
    When creating a ComponentGroup using a Query in OnCreateManager and applying a Filter you get this Error :

    InvalidOperationException: Trying to get iterator for SharedComponentX but the required component type was not declared in the EntityGroup.


    While creating a ComponentGroup using a ComponentType[] and applying a Filter on it will work fine.
     
  2. dartriminis

    dartriminis

    Joined:
    Feb 3, 2017
    Posts:
    154
    Ives noticed this as well. However, the ComponentGroup.CreateArchetypeChunkArray() method does work.
     
  3. nttLIVE

    nttLIVE

    Joined:
    Sep 13, 2018
    Posts:
    77
    Can some one from the ECS team confirm if this is intentional? Is manual filtering the go-to solution?
     
  4. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    4,671
    Yeah the new EntityArchetypeQuery & CreateArchetypeChunkArray API's are still very much WIP...