Search Unity

Question Using IJob for building nested data structure

Discussion in 'Editor & General Support' started by mishakozlov74, Sep 18, 2021.

  1. mishakozlov74

    mishakozlov74

    Joined:
    Aug 8, 2018
    Posts:
    143
    Hello, I have an Octree data structure (every node has eight child nodes) and I want to optimize its building using multithreading.

    So, I have a recursion, when starting from top node I go down for few levels and run some code to create child nodes over and over again.

    At some point of iteration I check colliders, which is also a quite heavy operation in terms of computation.

    The question is, how do I apply Jobs here? My recursion function isn't able to schedule new Jobs inside, am I right?

    And it's not possible to work with colliders, if I don't use DOTS physics (who does, it's preview)

    Thanks.