private void CacheObjects(IPrefabsReferences prefabs) { for (int i = 0; i < prefabs.Prefabs.Count; i++) { cache[prefabs.Paths[i]] = prefabs.Prefabs[i]; } }
public PrefabsService(IServices services, IPrefabsReferences prefabs) { this.services = services; cache = new Dictionary <string, GameObject>(); CacheObjects(prefabs); pool = new PrefabsPool(); }