Search Unity

Mesh class and Jobs/Burst/Mathematics question

Discussion in 'General Graphics' started by Lynxed, Jul 25, 2019.

  1. Lynxed

    Lynxed

    Joined:
    Dec 9, 2012
    Posts:
    121
    What are best practices of using Job System, Mathematics, Burst and setting/getting Mesh data without generating garbage?

    Mesh.SetVertex needs List<Vector3>, but Burst is optimized for Mathematics, which is <float3>. Do i have to create and copy hundreds of thousands of data to an intermediate NativeArray<Vector3> and then copy that to List<Vector3> just to assign verts to a mesh? Mesh class makes it really hard to work with. Same with just peeking into data.

    Please help.
     
  2. Bas-Smit

    Bas-Smit

    Joined:
    Dec 23, 2012
    Posts:
    274
    Lynxed and richardkettlewell like this.
  3. Lynxed

    Lynxed

    Joined:
    Dec 9, 2012
    Posts:
    121
    OMG thanks! Awesome stuff!