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 7f6d20e3..e18db5d6 100644 Binary files a/Refs/UnityEngine.CoreModule.dll and b/Refs/UnityEngine.CoreModule.dll differ