Search Unity

Job system confusing

Discussion in 'C# Job System' started by TomPo, Apr 19, 2019.

  1. TomPo

    TomPo

    Joined:
    Nov 30, 2013
    Posts:
    86
    Hi
    Am I missing something or this job system is odd?

    I mean
    "Job structs may not contain any reference types"
    "Accessing statics is indeed not intended to be allowed and will be protected against in the future."

    So what is this system for?
    To make long calculations like a+b and get the result?

    Was hoping that I will be able to use them to for example calculate pathfinding but in this case, we have to pass somehow to the job current tiles information or grab them somehow from inside the job.
    But looks like it can't be done.

    In what world other threads can't access static data? Or can't use references?
    So... what this job system is for? Or I'm missing something here?
     
    Last edited: Apr 19, 2019
    bb8_1 likes this.
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,745
    I think the main impetus of the Jobs system is as part of Unity DOTS, the Data Oriented Tech Stack that Unity is developing.

    ECS (the Entity Component System) is the first part of this.

    The Jobs system is intended to allow your various CPU resources to be efficiently applied to vast streams of vector data.

    Here's a talk from last month:


    And here's a more technical talk that's a year older:
     
    bb8_1 likes this.
  3. odoluca

    odoluca

    Joined:
    Nov 5, 2014
    Posts:
    28
    I hear you. Its 2021 and I still prefer c# threads over job system. Especially the requirement of nonmanaged code for job system is ridiculous.