using Darkmatter.Core; using System.Collections.Generic; using System.Runtime.InteropServices.WindowsRuntime; using UnityEngine; using VContainer; using VContainer.Unity; namespace Darkmatter.Presentation { public class ObjectPool : MonoBehaviour,IPool where T : MonoBehaviour, IPoolable { [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