Just one level out of my three levels is lagging

hello guys.i making a game with 3 levels in unity and my first two level are doing ok but whenever i change to my third level ,it becames slow and laggy and whenever i play the game in the game view it start laging but the other two levels are fine and dont lag…please i need help because this game is my final project and i have to finish it as soon as possible…please. and thank you in advance.

and i also did some deepprofiler on a standalone build…i dont know if the problem is indicated in this profiling…

THANK YOU

How big is the level compared to the others?

not too big…i think my level 1 has a bigger terrain than my level 3 but i think level 3 has more object than level one

Did you compare the lag in a build versus game mode?
Terrains by default compute lighting, which can really bog things down. I always turn off compute lighting for them, because (I think) every time you change anything, it recomputes, which takes awhile. In the build this shouldn’t be an issue.

Hello…yes I have compared the lag in game and build mode and it pretty much the same …so I don’t think compute lighting is the problem

Is the lag dependent on the camera view? i.e. is it lagging if you are looking at certain things or directions?

How many objects do you have? How many batches? etc

Remove things from the lagging level until it stops lagging. You should be able to gain some insight in to what is causing this problem by doing that. Obviously commit to you repo first so you can revert this destructive change when you are done.

Hello @bobisgod234 thank you for the time…
funny enough most of what you mention are actually the cause of my problem…
1)whenever i look at a certain direction of my terrain it became so laggy
2)i have quite a lot of object in level 3 but i have deleted some stuff to see what might be causing the lag .i deleted all my enemy, because i do have a lot of enemy in the scene but no big different.i deleted my trees that were controlled by wind i deleted all my rock i had quite a lot of them but no big differnce.
i also tried to do occulusion culling but no big difference right in the begining of the game .my fps is a little bit better but whenever my camera starts to advance and look at a certain direction the level because very laggy …my other two levels are doing fine without any problems.
3)and for my batches it quit high…
normal it is 24504 but after removing alot of thing i actuaally need in my level ,it about 12095 …
it no big difference.
i need huge improvement without needing to remove a lot of stuff from my scene…i need help …please…and THANK YOU SO MUCH

That is a lot of batches, and probably the source of the lag.

How many things do you have in the scene? Enemy count etc

If you still have 12000 batches, keep deleting stuff until the performance improves.

How many batches do you have in the other scenes.

@In other scene i have way less batches …i have already tried remove thing one by on and still no good result
any other suggestion i should try…thank you

You removed everything and you still have 12000 batches? Really need more information about this scene.

How many things do you have in the scene? Enemy count etc

Ok…let try explain it …
After I removed everything the game was a little responsive .nothing extra ordinary…yes I still had about 1200 batches and whenever I look at the same direction or get close I can still fell the reduction and compared to other scene .it is so bad.and I probably have about 50 enemies or more but I already tested removing the enemies and nothing big or different …so I am so feed up

Ok…let try explain it …
After I removed everything the game was a little responsive .nothing extra ordinary…yes I still had about 1200 batches and whenever I look at the same direction or get close I can still fell the reduction and compared to other scene .it is so bad.and I probably have about 50 enemies or more but I already tested removing the enemies and nothing big or different …so I am so feed up

I don’t know if this is allowed on here…but I would like to know if we could communicate on discord or somewhere else where i can show you live …so you can see for yourself…I think you would understand better to know what the problem is and probably the solution as well

No. Post your problems here so that the solutions may be public and help others in the future. I am not going to provide you with personal, private support free of charge.

What you are saying is, you removed everything but the camera in the scene, but you still have 1200 batches? Because it sounds an awful like you didn’t remove everything but are saying you did regardless.

My guess is you have a particular mesh somewhere that has many submeshes (i.e. a mesh that requires many draw calls to render), and you have many instances of it in your level.

i dont know man …it so strange