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

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