I have a scene with many GameObjects containing mesh chunks in it but to start with only one object is enabled, the rest are all disabled in the UI with the checkbox in the inspector. However, when I try and test the scene on a device with low memory (iPod 4 Gen) the scene crashes on startup with no error. If I delete all the objects except the active one it works fine. Clearly Unity is loading the disabled gameobjects into memory at startup, surely they should be loaded as they are enabled? If this is desired behaviour is there any way I can achieve this short of separating each object into its own scene and loading it asynchronously when needed?
Use Resources.Load for objects that you only want to include on some platforms and not others. Anything in the scene, will be loaded by unity. This is the correct behaviour, even if disabled.
There is no getting around this.
You can simply make a large prefab containing all the child objects you need and put this in the Resources folder (make it if it doesn’t exist), and then use myGameObj = Resources.Load("Blah… in your Awake or Start.