- Home /
different game "scenes" and optimization?
i am making a game, so when the scene starts i have a bunch of different planes and objects, so depending on player prefs when the scene loads it will SetActive(false) or true depending on the scene selected in the menu, so in the actual game scene everything is in there and is active at first and then Awake setsactive true or false, so the question im really asking is, all of these things are just not active will that take an impact on performance, is there something else i should be doing instead of just leaving them SetActive(false)? this is a mobile app too, thank you for your time
Answer by Benproductions1 · Aug 19, 2013 at 04:40 AM
Hello,
The main reason a object can have an impact on performance is:
1. Rendering
2. MonoBehaviour functions (Update etc.)
Both of these are prevented by disabling the object with SetActive(false)
.
However there is a general overhead that comes with every object. If you have many objects, then that overhead could impact performance. To avoid this you could remove the objects from the scene and load them back using LoadLevelAdditive
asyncronously.
Hope this helps,
Benproductions1
Answer by CodeAssembler · Aug 19, 2013 at 04:35 AM
I don't think it will be big deal. It will waste a tad of memory (from the inactive but loaded objects) but otherwise it should not be big deal.
Your answer
![](https://koobas.hobune.stream/wayback/20220613112506im_/https://answers.unity.com/themes/thub/images/avi.jpg)