In the Start of my scenes I call the method that downloads the assetBundles for that scene. The problem is that it only downloads the first assetBundle from the list, the second does not download it. My code is:

Note: The Debug that shows the url shows the correct url both times, first http://mihost.com/assetbundles/asset1 and then http://mihost.com/assetbundles/asset2. However, in the Debug that shows the assets 'added' in both cases it shows the name only of those in asset1

public virtual IEnumerator LoadBundleFromServer()
{

var AssetPathOnServer = "http://mihost.com/assetbundles/"

var assetBundleNames = new List<string>();

for (int i = 0; i < assetBundleNames.Count; i++)
{
var currentAssetBundleName = assetBundleNames[i];
var url = AssetPathOnServer + currentAssetBundleName;
Debug.Log("url: " + url);

var request = UnityWebRequestAssetBundle.GetAssetBundle(url);
yield return request.SendWebRequest();
if (!request.isHttpError && !request.isNetworkError)
{

Debug.Log("count assets: " + AssetNames.Count);

for (int j = 0; j < AssetNames.Count; j++)
{
string assetName = AssetNames[j];
yield return asset;
AudioClip myClip = asset.asset as AudioClip;
if (!assetDictionary.ContainsKey(assetName))
{
}
}
}
else
{
//TODO: aqui hay que mostrar un error
Debug.LogErrorFormat("error request [{0}, {1}]", url, request.error);
}
}
}

public abstract List<string> AssetNames
{
get;
}

• Where is AssetNames populated? – Ed Marty Sep 27 at 13:59
• This method is in a parent class, from which all inherit My scenes So AssetNames is an abstract property that each daughter implements, now I realize that the AssetNames property is always returning the assetName of the current scene and that's why they are always the same, instead what I need is somehow to be able to list the assetNames within a bundle. Thank you very much, it was a mistake of my code;) – Jaime Roman Sep 27 at 14:18