1
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user