Should I split my scene up?

Hi, first of I’m really new to Unity so this is probably obvious to most of you. I have this city I’m working on in Blender, it’s really low poly, only about 720.000 for the entire city. It’s really big, so you’ll never be able to see all of it from any single point. It’s all individual parts in my file, about 10 thousand objects, but when Unity imports it it puts it all into a single file. It makes it so it’s kinda like all the objects are children of the master object, which makes it easier to move around and stuff so I like it. But does this mean that even if you’re seeing only one object from where you’re standing the entire city is rendered all the time? Or does Unity do some magic and knows that they’re all separate objects? How does Unity handle this, does it turn far away objects into LOD’s? And if so does that still work when it’s all in one object? Or does it think “he’s close to this one so it must mean he’s close to the whole thing”? The reason I’m asking is that it got a bit laggy after importing it.

I think what you are experiencing is that It’s not putting it into one file really, it’s putting all the single object meshes into a parent transform and using a lot of mesh renderers for each single object and you are drowning in draw calls.

I think you want the opposite, actually, and either combine or join all or most of the geometry of the city. If each building has windows and doors as separate objects, ctrl+J them together and make sure each building only has one material and texture by baking it all together in a larger texture. Using one 4096x4096 texture on one material is a lot better than many materials with many small textures. The more separate meshes and multiple materials the more draw calls the engine has to do per frame and I’m pretty sure this is what you are running into.

You can either combine everything/most things together into one main mesh in Blender or use Mesh.CombineMeshes in Unity at runtime as it’s relatively easy to get going if you are intermediate with C# and Unity’s API. There is a Free version of Mesh Baker on the asset store that may help as well if you aren’t up to coding your own system, but the free version only lets you use diffuse sharers for input and I find to be a bit fiddly depending on usage.