- Home /
How can I improve performance with many instances?
I have a scene which needs 14000 cuboid instances created dynamically. The cuboids do not need to move very often but I do need to be able to get mouse over details about them. The frame-rate drops when I view them all, how can I improve performance?

That's quite a broad and general question. With that many instances of an object, of course draw calls come to $$anonymous$$d, so you may want to look into batching. But on top of that, you may want to consider reducing your draw distance on your camera as to not draw all of them at once assu$$anonymous$$g they're spread out enough.
Need more detail before I can give you more advice than that.
I've added an image which might make it clearer. The cuboids are shipping containers which move rarely (only 50 moving at a time for example).
What are your draw call stats? What platform are you targeting? Do all the containers have rigidbodies on them? Are they doing anything particularly performance heavy?
no rigidbodies yet, but I believe I will need those to support mouse over
Answer by kalvinlyle · Apr 04, 2012 at 09:31 AM
Depends on what is causing the frame rate to drop. If it's script calls, remove the Update() method from your script and instead use Delegates, SendMessage or OnTrigger events
Your answer