0

I'm trying to download assetBundle from server and unzip it. All is working fine with Standard Shader Material (u can see it on the video).

But if material in assetBundle is Mobile/BumpedDiffuse so prefab instantiated with pink color like no material attached to prefab. But if I click to prefab I can see that there is attached material on this prefab. And there are texture map on material. And the most interesting thing that if i changed shader to any other all is fine even if I changed from Mobile/BumpedDiffuse to Mobile/BumpedDiffuse

In general, watch my video.

Thank you.

Video with problem on YouTube

private IEnumerator DownloadPrefabContent(string url)
{
    var www = UnityWebRequestAssetBundle.GetAssetBundle(url);
    yield return www.SendWebRequest();
 
    AssetBundle assetBundle = DownloadHandlerAssetBundle.GetContent(www);
 
    var prefabRequest = assetBundle.LoadAssetAsync<GameObject>("prefab.prefab");
    yield return prefabRequest;
 
    GameObject prefab = null;
    prefab = prefabRequest.asset as GameObject;
    _sessionContext.AddPrefabToList(prefab);
    Instantiate(prefab, prefab.transform.position, Quaternion.identity);
}
4

1 回答 1

1

The problem was in BuildTarget.Android. I change it to BuildTarget.StandaloneWindows64 and it is helped me.

于 2021-11-10T05:01:08.493 回答