hi,
My program have many (1000) text meshes in the scene, each text mesh has an extra drawcall, so the frame rate is quite slow.
Using combinechildren, meshes can be combined so drawcalls can be lowered, however, textmesh has no meshfilter, so it’s impossible to combine them.
As each text shares the same material and font texture, so I guess there must be some method to combine them together to accelerate the framerate, any suggestions?
There is no way if you use TextMeshes other than implementing some logic that just disables them when they are too far to be interesting (I highly doubt you need more than 20-30 of them visible at a time)
Why are you using hundreds of text meshes in the first place?
What stops you from combining those into a single text mesh for example, or making one big mesh in your 3d app instead?
thanks for reply first. I need to use more than 100 textmeshes because I’m making a small game map. The text mesh is the name of the building which always shows. Because the map has more than 100 buildings, so there’s more than 100 textmeshes in the scene.
How to combine the textmeshes into one? all the texts are in different place, the x,y,z coords are quite different, so how to combine them?
By combining i simply meant making a single textmesh.
It sounds like you should be able to use sprites instead, ie. a plane with a transparent texture on it. This in turn means you would be able to use an utility like Sprite Manager which can work on a single mesh.
Alternatively, you could make those text meshes in your 3d app instead of unity, and combine into a few meshes there.
thanks, I have found the sprite manager on the unifywiki, however, It says that works on iphone platform. However,I’m using windows platform, does it work too? Are there any examples showing how to use the sprite manager?