Search Unity

Question IJobEntityBatch or IJobChunk

Discussion in 'Entity Component System' started by Deleted User, Feb 4, 2021.

  1. Deleted User

    Deleted User

    Guest

    Hi there folks,

    It has been a while since I last touched Unity ECS and many things have changed. In what cases do you use IJobEntityBatch over IJobChunk and vise versa? I see that in 0.17 changelog Unity.Transforms now uses IJobEntityBatch over IJobChunk doe to lower overhead of scheduling. Is it always the case?

    Thank you.
     
    redwren likes this.
  2. Sarkahn

    Sarkahn

    Joined:
    Jan 9, 2013
    Posts:
    440
    You should use IJobEntityBatch in all cases
    Screenshot_20210204-085640.png
     
    andrew-lukasik and Timboc like this.
  3. Kmsxkuse

    Kmsxkuse

    Joined:
    Feb 15, 2019
    Posts:
    306
    Except for in cases where you're trying to BurstCompile ISystemBase OnUpdate() calls.

    Only IJobChunk works. The conversion between IJobChunk and IJobEntityBatch is pretty straightforward anyways.
     
    Timboc likes this.
  4. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,778
    My today rather disappointing experience, playing with IJobChunk and 10k entities.
    Bad jobs utilization. Idle, Idle, Idle

    btw.
    IJobEntitiesBatch doc link is still broken.