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. Join us on Thursday, June 8, for a Q&A with Unity's Content Pipeline group here on the forum, and on the Unity Discord, and discuss topics around Content Build, Import Workflows, Asset Database, and Addressables!
    Dismiss Notice

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:
    3,467
  3. wb646511

    wb646511

    Joined:
    Nov 20, 2022
    Posts:
    3