diff --git a/BoneSync/Patching/PoolPatches.cs b/BoneSync/Patching/PoolPatches.cs index bb9fa88..3acfd15 100644 --- a/BoneSync/Patching/PoolPatches.cs +++ b/BoneSync/Patching/PoolPatches.cs @@ -43,7 +43,7 @@ namespace BoneSync.Patching if (pool.Prefab.GetComponent() != null) return true; return false; } - public static bool isBlacklistedPool(Pool pool) + public static bool IsBlacklistedPool(Pool pool) { if (_blacklistedCache.ContainsKey(pool)) return _blacklistedCache[pool]; @@ -76,7 +76,7 @@ namespace BoneSync.Patching { if (CallPatchedMethods.allowPatchedMethodCall) return; if (__instance == null) return; - if (PoolBlacklist.isBlacklistedPool(__instance)) return; + if (PoolBlacklist.IsBlacklistedPool(__instance)) return; //SyncLogger.Msg("Patched Instantiating object in pool: " + __instance.name); __result.onSpawnDelegate = Il2CppSystem.Delegate.Combine(__result.onSpawnDelegate, (Il2CppSystem.Action)((g) => { PooleePatches.OnSpawnPatchPost(__result); })).Cast>(); __result.onDespawnDelegate = Il2CppSystem.Delegate.Combine(__result.onDespawnDelegate, (Il2CppSystem.Action)((g) => { PooleePatches.OnDespawnPatchPost(__result); })).Cast>(); diff --git a/BoneSync/Sync/Components/SyncableBase.cs b/BoneSync/Sync/Components/SyncableBase.cs index 92e88c9..daa93de 100644 --- a/BoneSync/Sync/Components/SyncableBase.cs +++ b/BoneSync/Sync/Components/SyncableBase.cs @@ -269,11 +269,7 @@ namespace BoneSync.Sync.Components private bool InPoolManagerTransform() { - if (transform.GetPath().StartsWith("/Pool Manager/")) - { - return true; - } - return false; + return (transform.root.name == "Pool Manager"); } public bool CanBeSynced() {