From c6aef47a7e558e626617b7be903a96aa6cbe985b Mon Sep 17 00:00:00 2001 From: Anairkoen Schno Date: Sun, 4 Nov 2018 01:35:45 -0600 Subject: [PATCH] Fixed some inconsistencies in the composite plugins Fixed some documentation spelling --- .../Loader/Composite/CompositeBSPlugin.cs | 27 ++---------------- IPA.Loader/Utilities/ReflectionUtil.cs | 2 +- Refs/UnityEngine.CoreModule.dll | Bin 539136 -> 539136 bytes 3 files changed, 4 insertions(+), 25 deletions(-) diff --git a/IPA.Loader/Loader/Composite/CompositeBSPlugin.cs b/IPA.Loader/Loader/Composite/CompositeBSPlugin.cs index af63294a..5080628f 100644 --- a/IPA.Loader/Loader/Composite/CompositeBSPlugin.cs +++ b/IPA.Loader/Loader/Composite/CompositeBSPlugin.cs @@ -24,36 +24,15 @@ namespace IPA.Loader.Composite } public void OnSceneLoaded(Scene scene, LoadSceneMode sceneMode) { - foreach (var plugin in plugins) { - try { - plugin.OnSceneLoaded(scene, sceneMode); - } - catch (Exception ex) { - Logger.log.Error($"{plugin.Name}: {ex}"); - } - } + Invoke(plugin => plugin.OnSceneLoaded(scene, sceneMode)); } public void OnSceneUnloaded(Scene scene) { - foreach (var plugin in plugins) { - try { - plugin.OnSceneUnloaded(scene); - } - catch (Exception ex) { - Logger.log.Error($"{plugin.Name}: {ex}"); - } - } + Invoke(plugin => plugin.OnSceneUnloaded(scene)); } public void OnActiveSceneChanged(Scene prevScene, Scene nextScene) { - foreach (var plugin in plugins) { - try { - plugin.OnActiveSceneChanged(prevScene, nextScene); - } - catch (Exception ex) { - Logger.log.Error($"{plugin.Name}: {ex}"); - } - } + Invoke(plugin => plugin.OnActiveSceneChanged(prevScene, nextScene)); } private void Invoke(CompositeCall callback) { diff --git a/IPA.Loader/Utilities/ReflectionUtil.cs b/IPA.Loader/Utilities/ReflectionUtil.cs index 21c07104..dc5638e2 100644 --- a/IPA.Loader/Utilities/ReflectionUtil.cs +++ b/IPA.Loader/Utilities/ReflectionUtil.cs @@ -36,7 +36,7 @@ namespace IPA.Utilities } /// - /// Sets a (potentially) private propert on the target object. + /// Sets a (potentially) private property on the target object. /// /// the target object instance /// the name of the property diff --git a/Refs/UnityEngine.CoreModule.dll b/Refs/UnityEngine.CoreModule.dll index 7f6d20e3db27a520f292d50d4992b8bf73cda144..e18db5d6feeb407c95235c3fe063542f71d0969c 100644 GIT binary patch delta 51 zcmZqpqR{X~VL}IUp!eCv?$&O`)^4WOZsyi*maW~ao;r+7?N@bJftU@5*|%TS;n3y< E048%2VgLXD delta 51 zcmZqpqR{X~VL}J<>S>1?yIZ>%Tf3QByO~?NS+;hwdg?GTwqMm@1!6WJX5W5QheMke E06&)#`~Uy|