x


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?

more ▼

asked Sep 27 '11 at 11:32 PM

normantran86 gravatar image

normantran86
31 4 6 8

(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1964
x591
x382
x19

asked: Sep 27 '11 at 11:32 PM

Seen: 737 times

Last Updated: Sep 27 '11 at 11:32 PM