- Home /
Best way to load information from server?
What is the best way to load information mapped to a Game Object from a server? Objects in my game will have extra data and information attached to them but this information will be on a server and fetched at run time via the use of asset bundles if they're needed. As far as I'm aware asset bundles can not contain scripts so how do I do this?
To further elaborate, the player will walk up to an object and upon selecting it, an asset bundle is downloaded and the information about the object displayed.
It needs to be done this way as I'm developing for the iPhone/ iPad so don't want to waste memory on having information preloaded when it might not be needed.
Any advice would help, thanks.
Woah, I'll just lay out my thought. Well if you're doing this to save weight, its the models, audios and textures that you want to strip out of the main build, not scripts. Finally the base idea is probably to use WWW to download AssetBundles containing your models and assets. Then add the scripts already in the main build using AddComponent(). Finally get your new models data either as .txt inside the AssetBundles or download it using WWW/WWWForm and some WebPortal/SQL. Note that all that takes time and should be initiated before the player actually needs it.
Thank you. That seems very helpful and is exactly what I'm look for. I'll give it a go and see what happens.
If it's not too much trouble could you elaborate on how exactly to load the data using WWW/WWWForm. I've read their references but am still not sure exactly how to proceed here.
Your answer
Follow this Question
Related Questions
Download content from server without AssetBundles 2 Answers
How to export to IOS 2 Answers
Iphone downloadable content restrictions 1 Answer
Large asset bundle can't decompress 0 Answers
Asset Bundles download at runtime 1 Answer