Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question ApplyAndDisposeWritableMeshData and CombineInstance results in "cannot combine mesh"

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

  1. tonytopper


    Jun 25, 2018
    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.