Hello!
When I load a scene (also when the game loads the first scene) I notice a lot of lag in the music and graphics.
Is there a way to handle scene loading without making the game freeze while loading?
My PC has an Intel I7 4.2GHz, 16GB of RAM and a GTX 960 4GB
Sounds like you need to profile your game and see what is creating the lag. If it really is music and graphics, then you’ll need to see what files are creating the problem and see what you can do to those files to help them.
You may need to load your scene async so it loads while you’re in your current scene, but unless you profile the game, we can only guess what is creating your lag. With your current info, we can only guess what may help you.
If you’re using the profiler window, even though the editor is frozen during the frame, it’ll create a clear “blip” on the line graph; if you click on that blip you’ll be able to see what was taking up so much time.
Amazing! I finally found that the extreme lag was caused by the SteamAPI initialization that I called on every scene start. Now I instantiate it only in the first scene and I use the DontDestroyOnLoad to maintain it instantiated.
Thanks to the profiler and your help