Optimize the environment

When it come to a large and complex environment, performance may be affected if there's so many objects spawned to the terrain. There are many methods can be used to optimize the scene, one of them are using the Group features.

Basically, the more objects in the scene, the more draw calls it need to render, the situation even worst if each of them can cast and receive shadow. So we need to combine objects of the same type into a larger object and render it once, to reduce rendering resources.

After spawning objects into the scene, click on the three-dot button at the top-right corner of the prefab tile in the Inspector window, then select Group. Done!

Scene before Grouping
Scene after Grouping, note the change of scene stats

You should try different Combination Physical Size values to maximize performance. Small value produces more group, thus more batches, draw calls and shadow casters, while large value produce less group, but loose the advantages of culling, since the bounds of that group is too large and being considered visible all the time!

Other technique use can use to optimize the scene:

  • Reduce object detail, especially number of vertices

  • Disable shadow if it's not important.

  • When modelling grass, make a bush instead of a single leaf.

  • Remove colliders and other component if they're not important.