diff --git a/IPA.sln b/IPA.sln
index 4ada6d21..29b719c4 100644
--- a/IPA.sln
+++ b/IPA.sln
@@ -1,11 +1,10 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 14
-VisualStudioVersion = 14.0.25420.1
+# Blend for Visual Studio 15
+VisualStudioVersion = 15.0.27428.2043
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IPA", "IPA\IPA.csproj", "{14092533-98BB-40A4-9AFC-27BB75672A70}"
ProjectSection(ProjectDependencies) = postProject
- {D1390268-F68B-4A55-B50D-EAD25756C8EF} = {D1390268-F68B-4A55-B50D-EAD25756C8EF}
{D1C61AF5-0D2D-4752-8203-1C6929025F7C} = {D1C61AF5-0D2D-4752-8203-1C6929025F7C}
{E2848BFB-5432-42F4-8AE0-D2EC0CDF2F71} = {E2848BFB-5432-42F4-8AE0-D2EC0CDF2F71}
EndProjectSection
@@ -42,4 +41,7 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {C7380FAB-02D6-4A2A-B428-B4BFCFE3A054}
+ EndGlobalSection
EndGlobal
diff --git a/IllusionInjector/CompositePlugin.cs b/IllusionInjector/CompositePlugin.cs
index 9c959c12..e2285bdf 100644
--- a/IllusionInjector/CompositePlugin.cs
+++ b/IllusionInjector/CompositePlugin.cs
@@ -28,8 +28,7 @@ namespace IllusionInjector {
}
public void OnSceneLoaded(Scene scene, LoadSceneMode sceneMode) {
- foreach (var plugin1 in plugins.Where(o => o is IPluginNew)) {
- var plugin = (IPluginNew) plugin1;
+ foreach (var plugin in plugins) {
try {
plugin.OnSceneLoaded(scene, sceneMode);
}
@@ -40,8 +39,7 @@ namespace IllusionInjector {
}
public void OnSceneUnloaded(Scene scene) {
- foreach (var plugin1 in plugins.Where(o => o is IPluginNew)) {
- var plugin = (IPluginNew) plugin1;
+ foreach (var plugin in plugins) {
try {
plugin.OnSceneUnloaded(scene);
}
@@ -52,8 +50,7 @@ namespace IllusionInjector {
}
public void OnActiveSceneChanged(Scene prevScene, Scene nextScene) {
- foreach (var plugin1 in plugins.Where(o => o is IPluginNew)) {
- var plugin = (IPluginNew) plugin1;
+ foreach (var plugin in plugins) {
try {
plugin.OnActiveSceneChanged(prevScene, nextScene);
}
@@ -84,38 +81,6 @@ namespace IllusionInjector {
Invoke(plugin => plugin.OnFixedUpdate());
}
- [Obsolete("Use OnSceneLoaded instead")]
- public void OnLevelWasLoaded(int level)
- {
- foreach (var plugin in plugins)
- {
- try
- {
- plugin.OnLevelWasLoaded(level);
- }
- catch (Exception ex)
- {
- Console.WriteLine("{0}: {1}", plugin.Name, ex);
- }
- }
- }
-
- [Obsolete("Use OnSceneLoaded instead")]
- public void OnLevelWasInitialized(int level)
- {
- foreach (var plugin in plugins)
- {
- try
- {
- plugin.OnLevelWasInitialized(level);
- }
- catch (Exception ex)
- {
- Console.WriteLine("{0}: {1}", plugin.Name, ex);
- }
- }
- }
-
public string Name {
get { throw new NotImplementedException(); }
diff --git a/IllusionInjector/PluginComponent.cs b/IllusionInjector/PluginComponent.cs
index e79bc936..877a59bb 100644
--- a/IllusionInjector/PluginComponent.cs
+++ b/IllusionInjector/PluginComponent.cs
@@ -9,7 +9,6 @@ namespace IllusionInjector
public class PluginComponent : MonoBehaviour
{
private CompositePlugin plugins;
- private bool freshlyLoaded = false;
private bool quitting = false;
public static PluginComponent Create()
@@ -28,19 +27,9 @@ namespace IllusionInjector
SceneManager.sceneLoaded += OnSceneLoaded;
SceneManager.sceneUnloaded += OnSceneUnloaded;
}
-
- void Start()
- {
- OnLevelWasLoaded(Application.loadedLevel);
- }
void Update()
{
- if (freshlyLoaded)
- {
- freshlyLoaded = false;
- plugins.OnLevelWasInitialized(Application.loadedLevel);
- }
plugins.OnUpdate();
}
@@ -72,12 +61,6 @@ namespace IllusionInjector
quitting = true;
}
-
- void OnLevelWasLoaded(int level)
- {
- plugins.OnLevelWasLoaded(level);
- freshlyLoaded = true;
- }
void OnSceneLoaded(Scene scene, LoadSceneMode sceneMode)
{
diff --git a/IllusionInjector/PluginManager.cs b/IllusionInjector/PluginManager.cs
index 48270790..39bcf545 100644
--- a/IllusionInjector/PluginManager.cs
+++ b/IllusionInjector/PluginManager.cs
@@ -82,9 +82,6 @@ namespace IllusionInjector
foreach (var plugin in _Plugins)
{
debugLogger.Log($"{plugin.Name}: {plugin.Version}");
- if (!(plugin is IPluginNew)) {
- debugLogger.Warning($"{plugin.Name} uses a Deprecated Interface! This may cause errors!");
- }
}
debugLogger.Log("-----------------------------");
}
diff --git a/IllusionPlugin/IPlugin.cs b/IllusionPlugin/IPlugin.cs
index 6aa5d179..44c22a21 100644
--- a/IllusionPlugin/IPlugin.cs
+++ b/IllusionPlugin/IPlugin.cs
@@ -42,9 +42,24 @@ namespace IllusionPlugin
///
void OnFixedUpdate();
- [Obsolete("Use OnSceneLoaded instead")]
- void OnLevelWasLoaded(int level);
- [Obsolete("Use OnSceneLoaded instead")]
- void OnLevelWasInitialized(int level);
+ ///
+ /// Gets invoked whenever a scene is loaded.
+ ///
+ /// The scene currently loaded
+ /// The type of loading
+ void OnSceneLoaded(Scene scene, LoadSceneMode sceneMode);
+
+ ///
+ /// Gets invoked whenever a scene is unloaded
+ ///
+ /// The unloaded scene
+ void OnSceneUnloaded(Scene scene);
+
+ ///
+ /// Gets invoked whenever a scene is changed
+ ///
+ /// The Scene that was previously loaded
+ /// The Scene being loaded
+ void OnActiveSceneChanged(Scene prevScene, Scene nextScene);
}
}
diff --git a/IllusionPlugin/IPluginNew.cs b/IllusionPlugin/IPluginNew.cs
deleted file mode 100644
index 393dc2bc..00000000
--- a/IllusionPlugin/IPluginNew.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using UnityEngine.SceneManagement;
-
-namespace IllusionPlugin {
- public interface IPluginNew : IPlugin{
- ///
- /// Gets invoked whenever a scene is loaded.
- ///
- /// The scene currently loaded
- /// The type of loading
- void OnSceneLoaded(Scene scene, LoadSceneMode sceneMode);
-
- ///
- /// Gets invoked whenever a scene is unloaded
- ///
- /// The unloaded scene
- void OnSceneUnloaded(Scene scene);
-
- ///
- /// Gets invoked whenever a scene is changed
- ///
- /// The Scene that was previously loaded
- /// The Scene being loaded
- void OnActiveSceneChanged(Scene prevScene, Scene nextScene);
- }
-}
\ No newline at end of file
diff --git a/IllusionPlugin/IllusionPlugin.csproj b/IllusionPlugin/IllusionPlugin.csproj
index 8bf9a741..29046e9a 100644
--- a/IllusionPlugin/IllusionPlugin.csproj
+++ b/IllusionPlugin/IllusionPlugin.csproj
@@ -1,4 +1,4 @@
-
+
@@ -44,7 +44,6 @@
-
diff --git a/IllusionPlugin/Logger.cs b/IllusionPlugin/Logger.cs
index 036550f8..1865cdd4 100644
--- a/IllusionPlugin/Logger.cs
+++ b/IllusionPlugin/Logger.cs
@@ -79,6 +79,7 @@ namespace IllusionPlugin {
f.WriteLine(d.Message);
Console.ForegroundColor = GetConsoleColour(d.WarningLevel);
Console.WriteLine(d.Message);
+ Console.ResetColor();
}
}