yyl
2026-05-11 51b0f6ed9f4e1d3bb6f8144470b46908c7699a96
Main/Core/ResModule/GameObjectPoolManager.cs
@@ -3,6 +3,8 @@
using System;
using Cysharp.Threading.Tasks;
using System.Linq;
using YooAsset;
#if UNITY_EDITOR
using UnityEngine.Profiling;
@@ -185,7 +187,7 @@
        }
        // 启动定期检查池的协程
        CheckPoolUsage();
        CheckPoolUsage().Forget();
    }
    private async UniTask CheckPoolUsage()
@@ -248,7 +250,7 @@
    /// </summary>
    /// <param name="prefab"></param>
    /// <returns></returns>
    public GameObjectPool RequestPool(GameObject prefab)
    public GameObjectPool GetPool(GameObject prefab)
    {
        if (prefab == null)
        {
@@ -286,7 +288,7 @@
            return;
        }
        RequestPool(prefab).Cache(count, _prefabActive);
        GetPool(prefab).Cache(count, _prefabActive);
    }
@@ -304,7 +306,7 @@
            return null;
        }
#endif
        return RequestPool(prefab).Request();
        return GetPool(prefab).Request();
    }