Unity Super Slow

Hi there!

I using Unity 2022.3.21f1 with Unity Plus Plan
and I working on my super big project, about 15-20GB of project size
my game named “Santhai” and it was released on iOS, Android, and PC Steam

Now, I still working on this huge project for Update and bug fixes, But why it start so slowly?
When I customize my C# scripts and save to trying on editor, But it take about 3-5 Min to continue Playing
I don’t even use Plastic SCM to upload my changed to the server, because I’m afraid that it might have to compiling my code and my changed every time, and it may start very very slow,

anyone have any tips about this?, how to increase work speed?

Thanks!!!

For a lot of script using Assembly Definitions is great to get back responsiveness. If your code is not set up the best it will be quite a task. Without this all C# scripts recompile every change iirc

And you can check the editor profiler as well to see if it is just compilation or also other things.

1 Like

I should make templates like Kurt Dekker. :wink:

Like, is Unity super slow when you create a new, empty project? Of course it isn’t. Everything that makes Unity slow is in your project. So you got to profile it. Profiler in edit mode with deep profiling, make a script change, analyze.

Did you write any editor scripts or imported assets that provide editor scripts? Scrutinize them specifically because more often than not those do too many things very inefficiently.

Make sure you remove unused assets, packages and modules. Keep your assets in the format you use them, ie don’t import 8k textures when you only output 2k, and prefer PNG over PSD, or FBX over blend.

In addition your system specs and config can play a large role. Is your project on a spinning magnetic disk drive of the ancient past, or on a SSD? Do you have the project excluded from virus scanners or do you happily allow several virus scanners run their analysis of every change to a .meta file?

In any case: Source control does not cause scripts to recompile.

To speed up enter playmode, see this: https://docs.unity3d.com/Manual/ConfigurableEnterPlayMode.html
But it may be too late to enable this now as you’ll likely run into “static” issues. But for the next project …

4 Likes

try checking with this tool also,

3 Likes

thank you guys very much for the advices!
or it slower because of internet speed?

because, today my internet speed is drop down from 20mbps to 0.01 mbps?

I’m not sure, it possible to turn-off background connection?

As was said before. We can be here all day and speculate. Instead take some time, profile your game and optimize. Otherwise you’re just shooting in the dark.

1 Like

“Akshually…” that’s a bit overbroad of a statement. :slight_smile:

Yes, source control simply observing a directory should never trigger a script recompile / reimport.

And… source control being commanded to change the contents of your project SHOULD under all circumstances trigger a recompile / reimport.

I will also note that one way to get in trouble with Unity is to do a “heavy” source control branch change (eg, change points in your timeline in a way that causes a large number of files to be modified), then alt-tab back to Unity before all the changes get written to disk.

My theory on that last one is that Unity sees some changes and then starts furiously recompiling / reimporting, only to have additional changes written to disk by the now-in-background source control, and then the asset database gets out of sync with the file hashes, or some other similar bookkeeping error crops up.

1 Like