I have one-scene 3d game and there are a lot of objects placed in it.When i want just to turn the camera in the editor for example to the right or to the left it lags and move nearly in 1-2 seconds.After building the same is happening.Shortly: you move the mouse to the locations side - it lags.When you move to the point where there is no location with objects - it doesn’t lag. Maybe the solution is in optimizing,maybe i am wrong.Does anyone know about this problem?
Do you have any scripts attached to those gameobjects?
I have on a few,but all other are just 3d models.
Needs more info / screenshots of whats in the scene/project… at least this one: Unity - Manual: The Rendering Statistics window
the fps drops even on low quality settings
Just curious, what are the specs of your computer? Specifically CPU, GPU, RAM.
I noticed you have a high number of tris/verts, which should still be OK on non-mobile systems but perhaps your hardware is too slow. After all, you mentioned that it lags only when it looks at the high number of objects, and doesn’t lag when there’s few objects.
Are you using a lot of realtime lighting?
The editor needs some kind of culling distance, like far clip on camera…
It is really HAAAARD editing huge scenes. Even when they run smooth in player, devices etc, it is hard editing a huge city, since all the buildings/streets/objects will be shown in editor. Like you, if I turn to the opposite side with just a few objects, it is faster. But while seeing the other… Also objects with gizmos are too bad to show, if you have many of them.
How can we set a distance for far clip on editor camera, is that possible?
Yeah,there is a little bit realtime lighting.You asked for my hardware (8GB RAM)
“set a distance for far clip on editor camera” - i am not sure about that but i tried it on the FPController camera and it worked but! in some cases i need to make the first person camera “see” far.For example,to see house lightning at night.
i want to add that i turned off the trees because with trees it lags as f…Every tree is an object too.I know it’s crazy but by this way i could put colliders on one tree and then just use brush either the collider didn’t work (but that’s another story).
I think it’s everything fine with engine and the problem is in optimization definitely.I’ve even heard that hierarchy of all objects should be very strict and sorted by folders because this affecs stability and performance.Don’t know,is that true?
I also should say that the map is 10.000x10.000
As far as I know, no. What’s going to matter is how you use occlusion culling, LOD, script optimization, light baking, shaders optimization etc… even if there’s hierarchy performance difference that I’m not aware of, it’s nowhere near the optimization needed to run such a large map on that PC.
It’s actually got decent specs, but it’s a 10,000x10,000 map as you said, which means there’s a huge amount of stuff to render. I see you have a “M” GPU, so it’s a laptop (obviously can’t upgrade it).
I recommend looking into optimizing your project, especially the methods I’ve listed above. Occlusion culling could probably help you a lot with the trees. Remember that you should optimize each tree as much as possible, as when you have so many, even the slightest difference will make huge changes.
Did you look in the Profiler and see what’s going on there?
I can easily answer that: It’s the standard camera culling. Culling is very interesting, this doc explains what is culling, and the difference between frustum culling and manually-baked Occlusion Culling. Must read! Unity - Manual: Occlusion culling
Also look into optimizing your Terrain. On mobile projects when I’ve used large terrains, you need to make compromises. Normally I lower the detail distance so the terrain looks good close to the camera, but lowers in quality once it’s past a certain distance. You can read all you need about the Terrain settings here: Unity - Manual: Terrain settings
Finally, it’s not a secret that the Terrain system sucks. Everything from the sculpting tools, the lack of ability to make overhangs or holes, the $**t performance, the absolutely stupid alphamap system that doesn’t seem to work right, the fact that spawning prefabs with the Mass Place tool removes all scripts (for example, can’t interact with spawned trees)… I could go on and on. A new Terrain system is in the works, but it’s going to be months before it releases.
edit–preferences–general – disable auto refresh