- Home /
Question by
zak666 · Nov 03, 2018 at 08:43 AM ·
wwwscriptingbasicsdropbox
Dropbox check for game version? using WWW? get 1 page debug insted of 0.1?
hey gang looking for help getting a WWW call to checck a dropbox file for a 0.1.txt to check what version of my game to prompted a user to download a new version,
my text file is 0.1 and inside is 0.1 so it should let me play the game but it keeps telling me to update my game wen it should give me back a o.1 version and allow me to play. and a get a 1 page debug log and not a 0.1
using System.Collections;
using System.Collections.Generic;
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/lolinkhere");
yield return Update;
string update = Update.text;
Debug.Log( ""+ update );
if (update == "0.1") {
PleaseUpdate.SetActive(false);
NoUpdateNeed = true;
}
if (update != "0.1")
{
PleaseUpdate.SetActive(true);
NoUpdateNeed = false;
}
}
public void UpdateGameButton(){
Application.OpenURL ("http://mywebsite.website/index.php/play-game/"); //Download URL for new Version
}
}
Comment