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.

Question ApplyAndDisposeWritableMeshData and CombineInstance results in "cannot combine mesh"

Discussion in 'C# Job System' started by tonytopper, Dec 1, 2022.

  1. tonytopper

    tonytopper

    Joined:
    Jun 25, 2018
    Posts:
    169
    I am getting a warning when trying to combine meshes that have been written to via ApplyAndDisposeWritableMeshData.

    I get a useless console warning each time I try to add a mesh to the CombineInstance array from the array of meshes I wrote data to via ApplyAndDisposeWritableMeshData.

    Screenshot 2022-11-30 173337.png

    Not sure if this is a bug or if I did something I wasn't supposed to.

    Another clue, I tried copying the Mesh data out piece by piece and was able to get CombineMesh to work but as soon as I tried copying the MeshData out using SetVertexBufferParams and SetVertexBufferData it stopped working.

    Seems like for some reason I'm not able to use SetVertexBufferData with CombineInstance. This is a pain as I have to copy out each piece of data separately.

    Seems suspiciously like a bug. Maybe someone at Unity has clues on why this might be the case.