Exemplo n.º 1
0
    IEnumerator LoadAssetCoroutine <T>(string path, Action <AssetLoadInfo> action, object arg) where T : Object
    {
        yield return(LoadAssetCoroutineHelper <T>(path));

        if (action != null)
        {
            action.Invoke(AssetLoadInfo.Create(path, arg));
        }
    }
Exemplo n.º 2
0
 IEnumerator LoadAssetCoroutine <T>(List <string> pathList, Action <List <AssetLoadInfo> > action, object arg) where T : Object
 {
     foreach (var item in pathList)
     {
         yield return(LoadAssetCoroutineHelper <T>(item));
     }
     if (action != null)
     {
         List <AssetLoadInfo> list = new List <AssetLoadInfo>();
         foreach (var item in pathList)
         {
             list.Add(AssetLoadInfo.Create(item));
         }
         action.Invoke(list);
     }
 }
Exemplo n.º 3
0
 IEnumerator LoadAssetCoroutine <T>(List <string> pathList, Action <List <AssetLoadInfo> > action, object arg) where T : Object
 {
     //foreach (var item in pathList)
     //{
     //    AddPrepareLoadDic(item);
     //}
     foreach (var item in pathList)
     {
         yield return(LoadAssetCoroutineHelper <T>(item));
     }
     if (action != null)
     {
         List <AssetLoadInfo> list = new List <AssetLoadInfo>();
         for (int i = 0; i < pathList.Count; i++)
         {
             list.Add(AssetLoadInfo.Create(pathList[i], arg));
         }
         action.Invoke(list);
     }
 }