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
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.
The main reason a object can have an impact on performance is:
- MonoBehaviour functions (Update etc.)
Both of these are prevented by disabling the object with
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
Hope this helps,