playMaker

Author Topic: Automatic Updater [SOLVED]  (Read 914 times)

PlaymakerNOOB

  • Full Member
  • ***
  • Posts: 219
Automatic Updater [SOLVED]
« on: July 08, 2019, 11:43:23 AM »
Can somebody convert this .js into an action please?  Cant use it in 2019 unity as Javascript has been removed.


Code: [Select]
import System.IO;
 
 private var latestVersionString = "randomText";
 var thisVersionFloat : float = 1.0;
 var dropBoxLatestVersionTXT = "https://www.dropbox.com/s/???????????????/version.txt?raw=1";
 
 function Start () {
     
   var www : WWW = new WWW(dropBoxLatestVersionTXT);
   yield www;
     

 
     latestVersionString = www.text;

     
    var latestVersionFloat : float = 3.14159265358979f;
   
    latestVersionFloat = float.Parse(latestVersionString);

   
    if(latestVersionFloat==thisVersionFloat) Debug.Log("You have the latest version of the game");
    if(latestVersionFloat>thisVersionFloat) Debug.Log("You have outdated version of the game");
 
 }



--edit--

Found wwwPOST on ecosystem.  Just use that to point to a text file, save the response string to a variable.
« Last Edit: July 08, 2019, 11:46:39 AM by PlaymakerNOOB »