- Home /
How to use asset bundle as database instead of PlayerPrefs
Hi, I am new in unity3d. I normally use PlayerPrefs to store data like scores, coins etc in my game. I am working on a game in which I need to make dynamic database which can be alter by server side.
Can I use asset bundle for it? Can anyone provide me the step by step implementation of database via asset bundle. How can I store integer , list and arrays into asset bundle ?
Is there any other options except asset bundle to make database.
Even a little help would be appreciated. Thanks in advance. :-)
Just start from reading about AssetBundle carefully. http://docs.unity3d.com/Documentation/ScriptReference/AssetBundle.html
AssetBundle can be created or modified in the Editor only, using BuildPipeline. So you can put some data there in the Editor only with no option to modify that at runtime.
PlayerPrefs can store or release data at game playtime only.
I would suggest making a dynamic database in form of a file saved on the server or a database.
You could switch to using the X$$anonymous$$LSerializer ins$$anonymous$$d, this will give you an easily parseable and readable file that is easy to manage. http://wiki.unity3d.com/index.php?title=Saving_and_Loading_Data:_XmlSerializer