diff --git a/IPA/IPA.csproj b/IPA/IPA.csproj
index 334cd8c..ad9c6aa 100644
--- a/IPA/IPA.csproj
+++ b/IPA/IPA.csproj
@@ -89,7 +89,7 @@
-
+
\ No newline at end of file
diff --git a/IPA/Program.cs b/IPA/Program.cs
index f105686..ce7b7b3 100644
--- a/IPA/Program.cs
+++ b/IPA/Program.cs
@@ -17,26 +17,27 @@ namespace IPA
}
string launcherSrc = Path.Combine("IPA", "Launcher.exe");
- string managedFolder = Path.Combine("IPA", "Managed");
+ string dataSrcPath = Path.Combine("IPA", "Data");
string pluginsFolder = "Plugins";
string projectName = Path.GetFileNameWithoutExtension(args[0]);
- string dataPath = Path.Combine(Path.Combine(Path.GetDirectoryName(args[0]), projectName + "_Data"), "Managed");
- string engineFile = Path.Combine(dataPath, "UnityEngine.dll");
- string assemblyFile = Path.Combine(dataPath, "Assembly-Csharp.dll");
+ string dataDstPath = Path.Combine(Path.GetDirectoryName(args[0]), projectName + "_Data");
+ string managedPath = Path.Combine(dataDstPath, "Managed");
+ string engineFile = Path.Combine(managedPath, "UnityEngine.dll");
+ string assemblyFile = Path.Combine(managedPath, "Assembly-Csharp.dll");
// Sanitizing
if (!File.Exists(launcherSrc)) Fail("Couldn't find DLLs! Make sure you extracted all contents of the release archive.");
- if(!Directory.Exists(dataPath) || !File.Exists(engineFile) || !File.Exists(assemblyFile))
+ if(!Directory.Exists(dataDstPath) || !File.Exists(engineFile) || !File.Exists(assemblyFile))
{
- Fail("Game does not seem to be a Unity project. Could not find the libraries to patch.");
+ Fail("Game does not seem to be a Unity project. Could not find the libraries to patch. ");
}
try
{
// Copying
Console.Write("Updating files... ");
- CopyAll(new DirectoryInfo(managedFolder), new DirectoryInfo(dataPath));
+ CopyAll(new DirectoryInfo(dataSrcPath), new DirectoryInfo(dataDstPath));
Console.WriteLine("Successfully updated files!");
if (!Directory.Exists(pluginsFolder))
diff --git a/IllusionInjector/Bootstrapper.cs b/IllusionInjector/Bootstrapper.cs
index 030f307..29f46c5 100644
--- a/IllusionInjector/Bootstrapper.cs
+++ b/IllusionInjector/Bootstrapper.cs
@@ -9,6 +9,14 @@ namespace IllusionInjector
class Bootstrapper : MonoBehaviour
{
public event Action Destroyed = delegate {};
+
+ void Awake()
+ {
+ if (Environment.CommandLine.Contains("--verbose") && !Screen.fullScreen)
+ {
+ Windows.GuiConsole.CreateConsole();
+ }
+ }
void Start()
{
diff --git a/IllusionInjector/Injector.cs b/IllusionInjector/Injector.cs
index 8bc2a95..62a139a 100644
--- a/IllusionInjector/Injector.cs
+++ b/IllusionInjector/Injector.cs
@@ -1,4 +1,5 @@
using System;
+using System.IO;
using UnityEngine;
namespace IllusionInjector
@@ -11,7 +12,6 @@ namespace IllusionInjector
if (!injected)
{
injected = true;
-
var bootstrapper = new GameObject("Bootstrapper").AddComponent();
bootstrapper.Destroyed += Bootstrapper_Destroyed;
}
diff --git a/IllusionInjector/PluginComponent.cs b/IllusionInjector/PluginComponent.cs
index e895345..faf85bd 100644
--- a/IllusionInjector/PluginComponent.cs
+++ b/IllusionInjector/PluginComponent.cs
@@ -14,11 +14,6 @@ namespace IllusionInjector
{
DontDestroyOnLoad(gameObject);
- if (Environment.CommandLine.Contains("--verbose") && !Screen.fullScreen)
- {
- Windows.GuiConsole.CreateConsole();
- }
-
plugins = new CompositePlugin(PluginManager.Plugins);
plugins.OnApplicationStart();
}