Hey gang, So I made this script in a attempt to see if I can get the content of a text file to see if a user has the current version (hosted on dropbox) though I’m getting a hole bunch of code in my Debug and not just the “1.1” inside the doc? It downloads and stuff but i get a Giant string rather then getting the 1.1, my idea was to check if its the version is not the same thats in the text-doc to prompt the player to a download page for the new version.
using UnityEngine;
using UnityEngine.UI;
public class UpdateGame : MonoBehaviour {
public GameObject PleaseUpdate;
public bool NoUpdateNeed;
IEnumerator Start(){
WWW Update = new WWW ("https://www.dropbox.com/s/99b8zns097lol93/1.1.text?dl=0");
yield return Update;
string update = Update.text;
Debug.Log( ""+ update );
if (update == "1.1") {
PleaseUpdate.SetActive(false);
NoUpdateNeed = true;
} else {
PleaseUpdate.SetActive(true);
NoUpdateNeed = false;
}
}
public void UpdateGameButton(){
Application.OpenURL ("http://www.mysite.com.downloads"); //Download URL for new Version
}
}