Exemplo n.º 1
0
 private void CacheObjects(IPrefabReferences prefabs)
 {
     for (int i = 0; i < prefabs.Prefabs.Count; i++)
     {
         cache[prefabs.Paths[i]] = prefabs.Prefabs[i];
     }
 }
Exemplo n.º 2
0
        public PrefabFactory(IServices services, IPrefabReferences prefabs)
        {
            this.services = services;

            cache = new Dictionary <string, GameObject>();
            CacheObjects(prefabs);
            pool = new PrefabPool();
        }