SetActive or SceneManger?
Hello everyone!
I'm beginner in Unity and I saw in some Unity-tutorials, that somebody using GameObject's, another one - SceneManager. So, my question: what is better to do? for FPS, GPU and CPU? For example:
SceneManager.LoadScene(0);
or
Current_scene.SetActive(false);
Next_Scene.SetActive(true);
I'm sorry for silly question, but anyway. Thanks a lot!
Answer by vinilly · May 26, 2018 at 02:30 PM
For optimal resources when starting your game I would recommend to have a splash screen Which is a scene with maybe and image and a coroutine timer before loading the start screen.
You can continue this spash/load scene to have a seamless transition from scene to scene. Using SceneManager.LoadScene is far better than keeping scenes loaded in the background by setting them active false, as they continue to use up resources until unloaded.
Depends on the type of game your making sometimes we need to keep scenes loaded in the backgrounds to use global chats etc but once your more advance and probably publish a few games before then we might start to look into that.
Some games keep a menu scene active false thats the only time I would doit not with a heavy resource scene with many objects loaded.
Sorry I forgot to explain some thing inside my game... =) Like it's easy tap-game in 2D. Anyway, thanks a lot!
Your answer
Follow this Question
Related Questions
How do I optimize my game when I've tried everything and still runs slow? 1 Answer
Implementation of GPU Flocking? 0 Answers
Increase FPS 0 Answers
Mystery! Low fps in empty scene with Core i7-6700k and GeForce GTX 1080 3 Answers
Strange framerate problem 0 Answers