Beispiel #1
0
        public void AddAssetByKey(string key, Object obj)
        {
            HolderData hd = GetAssetByKey(key);

            if (hd == null)
            {
                hd = new HolderData();
                assetList.Add(hd);
            }
            hd.key   = key;
            hd.asset = obj;
        }
Beispiel #2
0
 public HolderData GetAssetByKey(string key)
 {
     for (int i = 0; i < assetList.Count; i++)
     {
         HolderData data = assetList[i];
         if (!useAssetName)
         {
             if (key == data.key)
             {
                 return(data);
             }
         }
         else
         {
             if (key == data.asset.name)
             {
                 return(data);
             }
         }
     }
     return(null);
 }