basic Questions about MeshFilter:Optimize mesh
hey at all,
i'm wondering what's the meaning of mesh.Optimize(). i've read in the doc it's good for perfomance of the gpu. Sounds good to me but ... What will be optimized ?
For example i use a enemyship with about 2500 faces and 4000 vertices. And i will need up to 20 of them. As well as i want to use about 200 low poly fbx spheres as asteroids. So does it make sence to use that for each imported objects ? And if so would it have a significant benefit for gpu perfomance ?
Some users wrote that some objects didn't "work" anymore as they should after using optimize... So i ask my self where or when should this function being used ?
in Awake() or Start() or Update() or whenever( :) )
Sorry for overloading this thread with so many questions :)
I would be glad about some answers to understand this topic
i think this will be helpfully for any other beginner like i am
thx previously !
Answer by cjdev · Feb 03, 2016 at 02:34 AM
mesh.Optimize sorts the vertices in memory in such a way that they are grouped by proximity so when the GPU renders them it has neighboring vertices already stored in cache. I believe it's mostly meant for procedurally generated meshes but if you want to run it I'd suggest to do it in Awake or Start.