Reputation: 4336
I have a normal project with about 30 Scripts and 30 Scenes (approx). When unloading any scene, it takes about 2 seconds.
For testing, I have made 2 empty scenes with 1 button each and want to transition back and forth. But again the Scene unload is taking time approx 2 seconds for an empty scene (Both scenes are empty). When I deleted other Scripts and Scenes from the Project, the Scene unloads and loads immediately. It means that in projects with minimum Assets, Unity unloads and load Scene immediately, but when project size increases, Unity takes time to unload even an empty scene. I have also tried SceneManager.LoadSceneAsync("SceneName");
, but it still took time after clicking the button. What might be the problem? Does Unity takes time to unload an empty scene when the project size is large? I don't want to show loading animation or any sort of such things. I want to load an empty scene immediately even if the project size is large. Project size or number of Assets in the Assets folder must not affect the scene unloading time as scene loading time is dependent on the number of GameObjects and Scripts attached in that scene.
Upvotes: 2
Views: 752