|
@ -28,8 +28,7 @@ namespace IllusionInjector { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void OnSceneLoaded(Scene scene, LoadSceneMode sceneMode) { |
|
|
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 { |
|
|
try { |
|
|
plugin.OnSceneLoaded(scene, sceneMode); |
|
|
plugin.OnSceneLoaded(scene, sceneMode); |
|
|
} |
|
|
} |
|
@ -40,8 +39,7 @@ namespace IllusionInjector { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void OnSceneUnloaded(Scene scene) { |
|
|
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 { |
|
|
try { |
|
|
plugin.OnSceneUnloaded(scene); |
|
|
plugin.OnSceneUnloaded(scene); |
|
|
} |
|
|
} |
|
@ -52,8 +50,7 @@ namespace IllusionInjector { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void OnActiveSceneChanged(Scene prevScene, Scene nextScene) { |
|
|
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 { |
|
|
try { |
|
|
plugin.OnActiveSceneChanged(prevScene, nextScene); |
|
|
plugin.OnActiveSceneChanged(prevScene, nextScene); |
|
|
} |
|
|
} |
|
@ -84,38 +81,6 @@ namespace IllusionInjector { |
|
|
Invoke(plugin => plugin.OnFixedUpdate()); |
|
|
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 { |
|
|
public string Name { |
|
|
get { throw new NotImplementedException(); } |
|
|
get { throw new NotImplementedException(); } |
|
|