{
return Instantiate(Prefab);
}
public interface IFactory<T>
T Create();
[SerializeField]
private PoolableParticle _prefab = default;
public override PoolableParticle Prefab {
public override PoolableParticle Prefab
get
return _prefab;
private IEnumerator Start()
List<PoolableParticle> particles = _pool.Request(10) as List<PoolableParticle>;
foreach(PoolableParticle particle in particles)
foreach (PoolableParticle particle in particles)
particle.transform.position = Random.insideUnitSphere * 5f;
particle.Play();
void OnRequest();
void OnReturn(Action onReturned);