- Home /
Using AssetBundles as IAP Crashing
Hi, we're creating an iOS game and want to create IAP assetbundles that the user can buy and then download from our servers.
Basically when the user has bought the IAP and loads up the "Level Select" Scene for the DLC levels, we use WWW.LoadFromCacheOrDownload("http://where.we.are.hosting/our.assetbundle", 1); to download or load from cache the 60 levels we've created for the build.
Then we call Application.LoadLevelAsync("NameOfDLCLevelSelect") ; to start the first scene. Now this works if I build from the Editor into XCode and then from XCode onto my iOS Device. It still works if I build from XCode again.
However, if I make changes in the editor and then rebuild from editor -> xCode-> device and attempt to call WWW.LoadFromCacheOrDownload("http://where.we.are.hosting/our.assetbundle", 1); again, xCode says my level, "NameOfDLCLevelSelect" does not exist in the build settings. Then the app crashes with a bad-access exception.
If I delete the app from the device and rebuild from XCode, then it works.
I'm concerned that this is what would happen to a user if they were to update their app from the iTunes Store. Arguably, the same thing happens if you download a new version of the app and retain all the app data, right?