static void fetchChangelog(string apiResult) { gitAPI git = JsonUtility.FromJson <gitAPI>(apiResult); publishdate = git.published_at; curVer = git.tag_name; changelog = git.body; downloadLink = git.zipball_url; //oldChangelog = // Debug.Log(git.body); // Debug.Log(apiResult); // Debug.Log(git.tag_name); // Debug.Log(git.html_url); // Debug.Log(git.published_at); // Debug.Log(git.zipball_url); // Debug.Log(git.body); }
static void updateHandler(string apiResult) { gitAPI git = JsonUtility.FromJson <gitAPI>(apiResult); bool option = EditorUtility.DisplayDialog("XSToon: Updater", "You are on version: \nv" + XSStyles.ver + "\n\nThe latest version is: \n" + git.tag_name + "\n\n You can view the changelog either on my Discord, or at the Github page for this release." + "\n\nWould you like to update?", "Download", "Cancel"); switch (option) { case true: Application.OpenURL(git.zipball_url); break; case false: Debug.Log("Cancelled Update."); break; } // Debug.Log(apiResult); }