mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
try and apply some simple optimizations
This commit is contained in:
parent
68c969493f
commit
6da9071208
@ -13,7 +13,7 @@ namespace NewHorizons.Components.Props
|
|||||||
public bool CloseEyes;
|
public bool CloseEyes;
|
||||||
public bool SetActiveWithCondition;
|
public bool SetActiveWithCondition;
|
||||||
|
|
||||||
private PlayerCameraEffectController _playerCameraEffectController;
|
private static PlayerCameraEffectController _playerCameraEffectController;
|
||||||
private bool _changeConditionOnExitConversation;
|
private bool _changeConditionOnExitConversation;
|
||||||
private bool _inConversation;
|
private bool _inConversation;
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ namespace NewHorizons.Components.Props
|
|||||||
|
|
||||||
public void Awake()
|
public void Awake()
|
||||||
{
|
{
|
||||||
_playerCameraEffectController = GameObject.FindObjectOfType<PlayerCameraEffectController>();
|
if (_playerCameraEffectController == null) _playerCameraEffectController = GameObject.FindObjectOfType<PlayerCameraEffectController>();
|
||||||
GlobalMessenger<string, bool>.AddListener("DialogueConditionChanged", OnDialogueConditionChanged);
|
GlobalMessenger<string, bool>.AddListener("DialogueConditionChanged", OnDialogueConditionChanged);
|
||||||
GlobalMessenger.AddListener("ExitConversation", OnExitConversation);
|
GlobalMessenger.AddListener("ExitConversation", OnExitConversation);
|
||||||
GlobalMessenger.AddListener("EnterConversation", OnEnterConversation);
|
GlobalMessenger.AddListener("EnterConversation", OnEnterConversation);
|
||||||
|
|||||||
@ -51,6 +51,8 @@ namespace NewHorizons.Handlers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static void SetUpStreaming(GameObject obj, Sector sector)
|
public static void SetUpStreaming(GameObject obj, Sector sector)
|
||||||
{
|
{
|
||||||
|
return;
|
||||||
|
|
||||||
// find the asset bundles to load
|
// find the asset bundles to load
|
||||||
// tries the cache first, then builds
|
// tries the cache first, then builds
|
||||||
if (!_objectCache.TryGetValue(obj, out var assetBundles))
|
if (!_objectCache.TryGetValue(obj, out var assetBundles))
|
||||||
|
|||||||
@ -26,10 +26,11 @@ public static class ProfilerPatch
|
|||||||
foreach (var method in type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.DeclaredOnly))
|
foreach (var method in type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.DeclaredOnly))
|
||||||
{
|
{
|
||||||
if (!(
|
if (!(
|
||||||
method.Name.Contains("Make") ||
|
method.Name.StartsWith("Make") ||
|
||||||
method.Name.Contains("Init") ||
|
method.Name.StartsWith("Init") ||
|
||||||
method.Name.Contains("Find") ||
|
method.Name.StartsWith("Find") ||
|
||||||
method.Name.Contains("OnSceneLoaded")
|
method.Name == "SetUpStreaming" ||
|
||||||
|
method.Name == "OnSceneLoaded"
|
||||||
)) continue;
|
)) continue;
|
||||||
|
|
||||||
if (method.ContainsGenericParameters) continue;
|
if (method.ContainsGenericParameters) continue;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user