diff --git a/NewHorizons/Components/Props/ConditionalObjectActivation.cs b/NewHorizons/Components/Props/ConditionalObjectActivation.cs index a0322ecc..4036d610 100644 --- a/NewHorizons/Components/Props/ConditionalObjectActivation.cs +++ b/NewHorizons/Components/Props/ConditionalObjectActivation.cs @@ -13,7 +13,7 @@ namespace NewHorizons.Components.Props public bool CloseEyes; public bool SetActiveWithCondition; - private PlayerCameraEffectController _playerCameraEffectController; + private static PlayerCameraEffectController _playerCameraEffectController; private bool _changeConditionOnExitConversation; private bool _inConversation; @@ -45,7 +45,7 @@ namespace NewHorizons.Components.Props public void Awake() { - _playerCameraEffectController = GameObject.FindObjectOfType(); + if (_playerCameraEffectController == null) _playerCameraEffectController = GameObject.FindObjectOfType(); GlobalMessenger.AddListener("DialogueConditionChanged", OnDialogueConditionChanged); GlobalMessenger.AddListener("ExitConversation", OnExitConversation); GlobalMessenger.AddListener("EnterConversation", OnEnterConversation); diff --git a/NewHorizons/Handlers/StreamingHandler.cs b/NewHorizons/Handlers/StreamingHandler.cs index c037594d..24c75a6c 100644 --- a/NewHorizons/Handlers/StreamingHandler.cs +++ b/NewHorizons/Handlers/StreamingHandler.cs @@ -51,6 +51,8 @@ namespace NewHorizons.Handlers /// public static void SetUpStreaming(GameObject obj, Sector sector) { + return; + // find the asset bundles to load // tries the cache first, then builds if (!_objectCache.TryGetValue(obj, out var assetBundles)) @@ -152,4 +154,4 @@ namespace NewHorizons.Handlers } } } -} \ No newline at end of file +} diff --git a/NewHorizons/Patches/ProfilerPatch.cs b/NewHorizons/Patches/ProfilerPatch.cs index b6650d7e..6e31af24 100644 --- a/NewHorizons/Patches/ProfilerPatch.cs +++ b/NewHorizons/Patches/ProfilerPatch.cs @@ -26,10 +26,11 @@ public static class ProfilerPatch foreach (var method in type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.DeclaredOnly)) { if (!( - method.Name.Contains("Make") || - method.Name.Contains("Init") || - method.Name.Contains("Find") || - method.Name.Contains("OnSceneLoaded") + method.Name.StartsWith("Make") || + method.Name.StartsWith("Init") || + method.Name.StartsWith("Find") || + method.Name == "SetUpStreaming" || + method.Name == "OnSceneLoaded" )) continue; if (method.ContainsGenericParameters) continue;