Beispiel #1
0
 public void Regist(string tName, string tPath)
 {
     if (mPoolDic.ContainsKey(tName))
     {
         Debug.Log("对象池已注册该对象");
     }
     else
     {
         GameObject obj = new GameObject();
         obj.name = tName;
         PoolItem item = obj.AddComponent <PoolItem>();
         item.SetPath(tName, tPath);
         mPoolDic[tName] = item;
     }
 }