- Home /
Instantiate Slowdown?
Is there any slow slowdown created by Instantiate? I am working on a game in which many meshes need to be created along with MeshColliders, and MeshRenderers at once. Will this slow down gameplay, (I will be using occlusion culling), and how much can I expect this to slow down initial map load? Also, is there a standard way to combine meshes into one object? So instead of having 400+ small meshes I could have 40 larger meshes?
Thanks ahead of time, Marc
Answer by Joshua · May 26, 2011 at 03:18 PM
Yes, it slows the game down a lot (compared to other functions). But the slowdown just means that the frame in which you instantiate a lot of GameObject will take (somewhat) longer then your average framerate. If you instantiate at Start it doesn't matter much, because it'll just make the load seem a few frames longer, which is nothing compared to the scene's load time. If you're also instantiating during the gameplay you will notice a slowdown though.
To combine meshes, use this.
Your answer
Follow this Question
Related Questions
SpawnEnemies script slows the game significantly after just 40 or so? 1 Answer
how can I instantiate an object specifically at the intersection of a collider and a mesh 1 Answer
Can't render GameObject 3 Answers
Problem with the look direction after Instanciate/Rotate 0 Answers
Replace GameObject vs. replacing mesh and material? 2 Answers