Which is Better;All scripts in one script or multiple single scripts?

So for the game I’m working on I have a good amount of scripts and well my Project has a really long load time and lags a good bit. I was wondering if it would be better if I put all my scripts in one big script and if it would reduce the load time. There are 23 scripts in my project :sweat_smile:. I changed all the settings to reduce lag but nothing seems to work. I have low power on, along with using batch groups and having it not loading unnecessary assets and stuff. Anybody got any ideas?

It doesn’t matter as when you publish the game, all scripts marked as preload gets combined into one file

1 Like

Do you have any good ideas on how I could reduce lag and load time?

Anything that isn’t suggested here

Is going to be specific to the project and you will need to profile to find where the bottlenecks are

1 Like

Ok, thank you…

One last question,
If I am using a mixture of renders and models does that create more lag?

It can do. It depends on a variety of factors such as how many different materials are you using? Shaders being used? How many channels are you using on the material? Polycounts? Overdraw? Pixel fill rates etc

It’s specific to your project. Profiling is key here.

1 Like

Alright thank you so much for the Information!