Exemplo n.º 1
0
 /// <summary>
 /// 异步预热对象池
 /// </summary>
 /// <param name="assetPath"></param>
 /// <param name="size"></param>
 static public void AsyncWarmPool(string assetPath, int size = 5)
 {
     //异步加载后初始化
     AsyncLoad <GameObject>(assetPath, (obj) =>
     {
         //异步加载完
         GameObjectPoolManager.WarmPool(obj, size);
     });
 }
Exemplo n.º 2
0
        /// <summary>
        /// 预热对象池
        /// </summary>
        /// <param name="assetPath"></param>
        /// <param name="size"></param>
        static public void WarmPool(string assetPath, int size = 5)
        {
            var obj = Load <GameObject>(assetPath);

            GameObjectPoolManager.WarmPool(obj, size);
        }