This commit is contained in:
2026-07-27 16:59:22 +08:00
parent 48863cc4f8
commit 738b2b2d36
11 changed files with 298 additions and 89 deletions
@@ -113,7 +113,9 @@ public class FishResourcesData
if (mc != null)
mc.fishTypeID = id;
Pool.Instance.dic[id] = new PoolData(prefab, CreateFishManager.Instance.poolRoot.gameObject, id);
// ⭐ 统一用 Pool.Instance 的 poolObj 作为父节点(不再用 CreateFishManager.poolRoot),
// 这样 Pool.Clear() 销毁 poolObj 时能连带销毁所有 poolList_XXX 子节点,避免残留
Pool.Instance.dic[id] = new PoolData(prefab, Pool.Instance.EnsurePoolRoot(), id);
}
}, MergeMode.Intersection);