- Home /
Does Resources.Load() not work with Android Split Application
For various reasons we have to ship with a 50MB + binary so we loved the new Unity Application Split functionality. Unfortunately, when we use it, none of our Resources.Load() calls work any more? Is this a known restriction? What is the work around? We absolutely can not reference these things using the inspector for memory reasons.
I'm also having the same problem. Did you find any solution buddy.
Answer by Adamcbrz · Dec 14, 2012 at 04:39 AM
I don't know if this fixes your problem but The App Split functionality requires everything in your first scene (usually) a downloading scene. So anything in that scene has to be loaded into the 50MB apk. Everything get put into the expansion file. Make sure you are also handling the downloading of the expansion file.
http://developer.android.com/google/play/expansion-files.html Most of the time, Google Play downloads and saves your expansion files at the same time it downloads the APK to the device. However, in some cases Google Play cannot download the expansion files or the user might have deleted previously downloaded expansion files. To handle these situations, your app must be able to download the files itself when the main activity starts, using a URL provided by Google Play.
This tutorial might help you with that: http://labs.exoa.fr/tutorial-unity-4-apk-splitting-google-play-obb/
Answer by jreitman · Dec 14, 2012 at 06:26 AM
That's not the problem. This is after the OBB (expansion APK) is downloaded. The obb is loaded and all assets except things loaded with Resources.Load() (and Handheld.PlayFullScreenMovie()) are accessible, but anything accessed with the 2 methods do not work at all.
For those wondering, this was a known bug in Unity 4.0 which they fixed in Unity 4.0.1
Did they? I am having the same problem with 4.2.1f4 The file -is- getting downloaded and is appearing in Android/obb in the correct na$$anonymous$$g but Application.loadlevel just fails with an error in DD$$anonymous$$S saying it needs to be added to build settings.