In my game whenever user opens the game , it should fetch value from a url
void Start () {
string url = "http:/myurl";
WWW www = new WWW(url);
StartCoroutine(WaitForRequest(www));
}
IEnumerator WaitForRequest(WWW www)
{
yield return www;
// check for errors
if (www.error == null)
{
Debug.Log("WWW Ok!: " + www.data);
} else {
Debug.Log("WWW Error: "+ www.error);
}
}
I want to save this data in database to use in game.
I am not aware of databse in unity.
Which is the best method for it .
i only know about PlayerPrefab. Any other good method exist?
If user is not connected he should play with already saved data in mobile.
Need good advice and solution ?