Ejemplo n.º 1
0
 void Start()
 {
     if (poolPrefab == null)
     {
         Debug.Log("Pool prefab is missing or null", this);
     }
     else
     {
         Debug.Log("Iniciado", this.gameObject);
         poolID        = poolPrefab.GetInstanceID();
         objectsInPool = new Queue <GameObject>();
         if (PoolManager.AddExistingPoolHolder(this).GetInstanceID() == GetInstanceID())
         {
             Add(awakeSize);
         }
         else
         {
             poolPrefab = null;
             poolID     = 0;
         }
     }
 }