Hey everyone. I have built a game where explosions occur at suitable times, but when I run the built version, the first time the explosion particle system explodes, the game freezes up for a second or two. I have the particle system in the actual hierarchy because I wanted to modify a couple of settings in the system and make sure that it would load fine in the game, but that’s not working. The only time it freezes is on the first explosion. If anyone has any insight into this problem, I would be very appreciative.
Unity is loading the assets used by that prefab for the first time.
You can avoid that stutter by preloading all assets used by the scene.
To make sure that your scene preloads all assets, you usually make a loader scene (Displaying a splashscreen or menu) and then call Application.LoadLevel to load your real level.
The player loads the first scene without preloading and all other scenes with preloading.
(The first scene being the one that gets automatically loaded)
We don’t preload the first scene because it allows you to display the startupscreen as fast as possible.
All other scenes (Scenes you load with Application.LoadLevel) are always preloaded completely.
Ah - thank you. I’ve only been making single level “games” so far - that would explain it.