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); }
public bool TryGetPool(GameObject prefab, out PrefabzPool pool) { pool = GetPool(prefab); return(pool != null); }