using Darkmatter.Core; using System.Collections.Generic; using UnityEngine; using VContainer; using VContainer.Unity; namespace Darkmatter.Domain { public class ObjectPool : MonoBehaviour,IPool where T : Component { [SerializeField] T prefab; [SerializeField] private Transform prefabParent; [SerializeField] private int poolSize = 15; public Queue pool = new Queue(); [Inject] IObjectResolver resolver; public IReadOnlyCollection All => pool; private void Awake() { CreateObjectPool(); } private void CreateObjectPool() { for(int i=0;i