Optimizing and other questions.

So I’m working on a small project, something reasonable that I believe I can finish fairly easily. But I have a few questions I hope someone could shed some light on.

First off the game map is going to be based on a 2D array.
And from there I can represent level pieces as simple prefabs sized to fit within a 1x1 square in world space.
e.g. map[5,3] = prefab_tree;

Would the best way to do this be instantiating everything? I tried instantiating larger numbers of objects as simple as cubes and I saw a big hit to performance, any ideas about that?

I was hoping unity would be able to handle a pretty large world made of lots of these smaller cubes. I would just like to know what would be the most efficient method for doing this so I can keep a decent frame rate even on iPlatforms.

Hi, welcome to the forum!

If you have lots of similar objects, you can often get better performance by rendering them with Graphics.DrawMesh rather than creating a GameObject for each one.

Thanks for the response!

Drawing the meshes directly will help greatly. This is pretty much exactly what I was looking for.

I’ll give it a whirl and let you know how it goes.

I was afraid for a moment this thread would slip away forever. :slight_smile: