Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

Dynamic Mesh in 2017 vs 2018 issues

Discussion in 'Editor & General Support' started by KnuckleCracker, Sep 27, 2018.

  1. KnuckleCracker


    Dec 27, 2011
    So I was on the 2017 LTS build and all was right with the world. I have a simple class used for range indicating that dynamically sets its vertices, uvs, and triangles. It did the usual mesh.clear, mesh.vertices = vertices, etc.

    The refresh of the mesh was called from LateUpdate and in unity 2017 everything worked as expected. When I gave unity 2018.2.9 a shot the other day, things didn't work so well. It seems as if reassigning vertices (increasing the vertex and triangle count) didn't actually work. If the mesh started with a lot of vertices, I could lower the count but it wouldn't increase if it started with a lower amount. In 2018.2.9 if I changed from doing the refresh in LateUpdate to Update, it started working properly again. Odd, but it was a workaround I could live with (with eyebrow raised of course).

    So I give 2018.2.10 a shot wondering if that changed things. It does.... now doing the refresh in Update doesn't work either. Btw, doesn't matter if I call mesh.Clear(false) or not. And again, everything worked fine in unity 2017.

    So I'm either missing something super obvious, or this is perhaps something that just showed up in 2018.2.9 (I dunno, 2018.2.9 is the first 2018 I've tried) and I'm just really unlucky, or something about how to do dynamic meshing has changed and I missed the memo.