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 What is the "JobHandle OnUpdate(JobHandle)" overload

Discussion in 'Entity Component System' started by aaarrrlll, Dec 29, 2020.

  1. aaarrrlll

    aaarrrlll

    Joined:
    Dec 29, 2020
    Posts:
    8
    I have stumpled across code overriding an OnUpdate() overload, namely:
    Code (CSharp):
    1. protected override JobHandle OnUpdate(JobHandle inputDeps)
    2. {
    3.     // ...
    4. }
    5.  
    This overload does not appear in the ECS manual, and my Unity (Unity version 2020.2.0f1, Entities version 0.16.0-preview.21) cannot find the method when i try overriding it in a system.

    Has it been removed, or am i doing something wrong. What is it supposed to do, and what can i do instead?
     
    GilbertoBitt likes this.
  2. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,627
    You're probably looking at a JobComponentSystem instead of SystemBase
     
    aaarrrlll likes this.
  3. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    3,984
    In SystemBase, instead of JobHandle being passed in and then returned, it is now a property of the system called Dependency which you can use and modify however you need to.
     
  4. aaarrrlll

    aaarrrlll

    Joined:
    Dec 29, 2020
    Posts:
    8
    That must be the reason. Thanks a lot for the quick answer.

    Edit* and thanks for the explanation.