This repository has been archived by the owner on Jul 27, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
29 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,30 @@ | ||
using System; | ||
using System.Net; | ||
using System.Reflection; | ||
using MelonLoader; | ||
// using System; | ||
// using System.Net; | ||
// using System.Reflection; | ||
// using MelonLoader; | ||
// | ||
// namespace TeleporterVR.Utils { | ||
// public class ReMod_Core_Downloader { | ||
// internal static bool failed; | ||
// public static void LoadReModCore(out Assembly loadedAssembly) { | ||
// byte[] bytes = null; | ||
// var wc = new WebClient(); | ||
// try { | ||
// bytes = wc.DownloadData("https://github.com/RequiDev/ReMod.Core/releases/latest/download/ReMod.Core.dll"); | ||
// loadedAssembly = Assembly.Load(bytes); | ||
// Main.Log("Successfully Loaded ReMod.Core", Main.IsDebug); | ||
// } | ||
// catch (WebException e) { | ||
// failed = true; | ||
// Main.Logger.Error($"Unable to Load Core Dep ReModCore: {e}"); | ||
// } | ||
// catch (BadImageFormatException) { | ||
// failed = true; | ||
// loadedAssembly = null; | ||
// } | ||
// loadedAssembly = null; | ||
// } | ||
// } | ||
// } | ||
|
||
namespace TeleporterVR.Utils { | ||
public class ReMod_Core_Downloader { | ||
internal static bool failed; | ||
public static void LoadReModCore(out Assembly loadedAssembly) { | ||
byte[] bytes = null; | ||
var wc = new WebClient(); | ||
try { | ||
bytes = wc.DownloadData("https://github.com/RequiDev/ReMod.Core/releases/latest/download/ReMod.Core.dll"); | ||
loadedAssembly = Assembly.Load(bytes); | ||
Main.Log("Successfully Loaded ReMod.Core", Main.IsDebug); | ||
} | ||
catch (WebException e) { | ||
failed = true; | ||
Main.Logger.Error($"Unable to Load Core Dep ReModCore: {e}"); | ||
} | ||
catch (BadImageFormatException) { | ||
failed = true; | ||
loadedAssembly = null; | ||
} | ||
loadedAssembly = null; | ||
} | ||
} | ||
} | ||
// Use Penny's ReMod.Core.Updater Plugin to download the latest version of ReMod.Core.dll |