예제 #1
0
        public PrefabzPool GetPool(GameObject prefab)
        {
            var instanceID = prefab.GetInstanceID();

            if (!_pools.TryGetValue(instanceID, out var pool))
            {
                pool = new PrefabzPool(prefab);
                _pools[instanceID] = pool;
            }

            return(pool);
        }
예제 #2
0
 public bool TryGetPool(GameObject prefab, out PrefabzPool pool)
 {
     pool = GetPool(prefab);
     return(pool != null);
 }