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