Search Unity

Feature Request Can we have a overload of Physics.BakeMesh that works with MeshData struct

Discussion in 'C# Job System' started by X-BLaZeKiLL-X, Apr 26, 2023.

  1. X-BLaZeKiLL-X

    X-BLaZeKiLL-X

    Joined:
    Apr 9, 2013
    Posts:
    6
    Right now I have an IParralelForJob that generates meshes using the MeshDataArray, Since Physics.BakeMesh is thread-safe I want to generate colliders also using the job system. Currently Physics.BakeMesh requires a mesh instance ID which is not available till I complete the mesh data job and apply the mesh data array so for the colliders I would need to schedule a separate job. I was wondering if it would be possible to generate the colliders also in the same job.
     
    DevDunk likes this.
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,043
    Would indeed be very helpful!