Search Unity

Subtractive type in IJobProcessComponentData?

Discussion in 'Entity Component System' started by benoneal, Sep 5, 2018.

  1. benoneal

    benoneal

    Joined:
    Apr 15, 2016
    Posts:
    31
    I'm just getting started with Jobifying my more intensive ComponentSystems, and I've read that IJobProcessComponentData is the preferred pattern.

    In my game, I have a Pooled tag component that I use to disqualify a whole bunch of entity archetypes from many systems, so I use SubtractiveComponent<Pooled> a lot. How can I use IJobProcessComponentData and exclude Pooled components from being processed?
     
  2. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    RequireSubtractiveComponentAttribute and
    RequireComponentTagAttribute on the job struct
     
    xVergilx and SubPixelPerfect like this.
  3. benoneal

    benoneal

    Joined:
    Apr 15, 2016
    Posts:
    31