Search Unity

Clarify on Subtractive Component & EntityArchetypeQuery

Discussion in 'Entity Component System' started by NoDumbQuestion, Jan 3, 2019.

  1. NoDumbQuestion

    NoDumbQuestion

    Joined:
    Nov 10, 2017
    Posts:
    186
    From doc
    As I understand it, subtractive component allow us to iterate through chunk of archetype that have "Required components" and ignore all entity included "subtractive components".

    Then how is it different from EntityArchetypeQuery?
     
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,780
    I only assume, that group subtractive comopnents were developed before EntityArchetypeQuery.
    However, you still can use jobs triggered by groups with subtractive comopnents (or without), without need using EntityArchetypeQuery. So it may have own use.
     
  3. 5argon

    5argon

    Joined:
    Jun 10, 2013
    Posts:
    1,555
    All filtering API results in a chunk query. Chunk is the most granular unit before we are allowed by the lib to iterate its content. Subtractive component goes to None query, ignoring all chunks (not all entity) with that component.
     
    Antypodish likes this.