We need the app size to be below 50MB when the user downloads it for the first time (mobile app, from the App Store), and then we load the rest of the resources from our private server.
My understanding is that this will put our resources into two different locations, and therefore the loading mechanism is a little different for each.
As I understand Unity3D, at this stage of my studies, there are two primary ways to load assets in Unity:
My understanding is that I would use AssetBundle.Load() for those assets that are included in the application binary package. If there is an asset bundle, perhaps with a new game level and creatures, then I could grab that (say from a server) via LoadFromCacheOrDownload().
Subsequently, resources can become split into two piles:
- Assets > Resources folder
- the local cache
The result of this seems to be that the loading mechanism is dependent upon where the resource lives physically on the disk. This strikes me as a little bit strange: a resource is a resource, just load the darn thing.
As such, it seems to me that every time I load a resource, perhaps as dictated by a server-side XML file with a level construction recipe, I have to check every resource for existence in both places. It might be a static file, it might have been dynamically downloaded and cached, and it may not be known at compile time what combination of things will be combined and displayed to the player.
I want to be able to build scripts that don’t have to worry about this level of detail. I just want to load the resource if it is exists, no matter where it exists, and use it.
Is my understanding of this situation accurate?
If so, is there a standard Unity call that achieves what I’m looking for?
Perhaps my thinking about the entire matter is topsy-turvy. If so, please feel free to call me out on it or question my assumptions.