-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathVersionChecker.cs
41 lines (38 loc) · 1.1 KB
/
VersionChecker.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Reflection;
using System.Net;
using MelonLoader;
using UnityEditor;
using UnityEngine;
using UnityEngine.Networking;
using UnityEngine.SceneManagement;
namespace StanleyParableUltraModDeluxe
{
//Checks if the mod is on the latest version. If not output warning to console and ui.
public class VersionChecker : MelonMod
{
/* Didnt work. Will attempt later
public override void OnApplicationStart()
{
MelonLogger.Msg("Response:");
string Response;
var client = new WebClient();
try
{
Response = client.DownloadString("https://stanley-mod-thing.netlify.app/version.txt");
}
catch (WebException e)
{
MelonLogger.Error($"Failed to contact website: {e.Message}");
return;
}
MelonLogger.Msg("Response:" + Response);
}*/
}
}