Beispiel #1
0
 private void Awake()
 {
     _instance = null;
     for (int i = 0; i < Pools.Length; i++)
     {
         if (!string.IsNullOrEmpty(Pools[i].Label))
         {
             if (!NameToPoolId.ContainsKey(Pools[i].Label.ToLower()))
             {
                 NameToPoolId.Add(Pools[i].Label.ToLower(), i);
                 Pools[i].InitPool(this);
             }
             else
             {
                 Debug.LogWarning("[" + typeof(RecyclerManager).Name +
                                  "] Duplicated label detected (" + Pools[i].Label
                                  + "). Please provide diferent label names in your pools, duplicated pool will be ignored.");
             }
         }
         else
         {
             Debug.LogWarning("[" + typeof(RecyclerManager).Name +
                              "] Empty label detected, please specify a label for your Pools");
         }
     }
 }