I have a gun in my project that splurts out empty shells. After tweaking the objects and doint some scripting I could get the performance to a good level even with a high rate of fire, but one thing is still not right. When the empty shells finally lie on the ground, all physic components will be destroyed, but the mesh itself is still a separate object from the ground. Now, I have read in the Performance Pages that as there is a separate draw call for each object, a lot of visible objects could slow down performance, and that is exactly what I can observe after some 1000 of shells being put on the ground.
I know, the sensible thing to do would be to only allow a certain number of this meshes in game, or destroy them after a certain time, but I would like to try something different first:
- Is there any possability to transform a gameobject into a terrain detail mesh at runtime, to reduce the number of draw calls and make this former gameobject dissapear in the distance set for detail meshes?
Please point me in the right direction if this question was already asked, I found a answer to how to combine and uncombine objects, but after opening the script couldn't tell if this is what I am looking for.
Thanks in advance