Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. We are looking for feedback on the experimental Unity Safe Mode which is aiming to help you resolve compilation errors faster during project startup.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

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:
    80
    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:
    157
    Ives noticed this as well. However, the ComponentGroup.CreateArchetypeChunkArray() method does work.
     
  3. nttLIVE

    nttLIVE

    Joined:
    Sep 13, 2018
    Posts:
    80
    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:
    5,049
    Yeah the new EntityArchetypeQuery & CreateArchetypeChunkArray API's are still very much WIP...
     
unityunity