yyl
2026-05-08 ea4e25ceca21484cbb422b4ce49ec6bc1220441f
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();
    }