Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Why he said these two lines are equivalent?

Discussion in 'Entity Component System' started by SlumberPenguin, Sep 3, 2023.

  1. SlumberPenguin

    SlumberPenguin

    Joined:
    Sep 20, 2020
    Posts:
    25
    It seems like when I set dependency, the system will wait for the last job to finish before executing the next one.
    Why he said These are same? That's weird
    1.png 2.png
     
  2. Opeth001

    Opeth001

    Joined:
    Jan 28, 2017
    Posts:
    1,068
    The ISystem automatically handles the Dependency for you, so you don't need to pass and set it into you jobs.
     
  3. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,292
    For an IJobEntity / IJobChunk - codegen automatically handles dependencies if dependency parameter is left unset.
    See generated code.

    For an IJob - its left as is.
     
  4. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,623
    IJobChunk is not code generated
     
    xVergilx likes this.