Search Unity

Question Unity bake and create meshcollider in one job.

Discussion in 'Physics' started by wb646511, Mar 22, 2023.

  1. wb646511

    wb646511

    Joined:
    Nov 20, 2022
    Posts:
    3
    As you know, in unity jobs it is not possible to use managed types. therefore i can not create a mesh in a job and either have to use three nativearrays for tris verts and colors or use Mesh.MeshData. To bake the meshcollider i have to have created a mesh and input its instance id which i cannot do in a job.

    there also does not seem to be that clear of a documentation about Mesh.MeshData.

    i tried using MeshData but it seems pointless as there is no way to get an instance id from it.
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,063
  3. wb646511

    wb646511

    Joined:
    Nov 20, 2022
    Posts:
    3