public IEnumerator loadscene()
{
//AB包下载路径
string bundlePath = "https://free.quickfile.cn:9080/download/test?id=2f328e20-1c76-47a1-b622-6a0ef80594c6&name=test&content-type=application%2Foctet-stream";
UnityWebRequest www = UnityWebRequest.Get(bundlePath); //获取文件
yield return www.SendWebRequest();
byte[] results = www.downloadHandler.data; //二进制流读取
File.WriteAllBytes("D:/download/ABtest/AB/download/yubel", results); //写入本地
ToolVerify.ABEncypt(ref results);
AssetBundle ab = AssetBundle.LoadFromMemory(results);
GameObject moban = ab.LoadAsset<GameObject>("yu");
GameObject temp = Instantiate(moban, transform);
temp.transform.localPosition = Vector3.zero;
}
public IEnumerator loadscene()
{
//AB包路径
string bundlePath = "https://free.quickfile.cn:9080/download/test?id=2f328e20-1c76-47a1-b622-6a0ef80594c6&name=test&content-type=application%2Foctet-stream";
UnityWebRequest www = UnityWebRequest.Get(bundlePath); //获取文件
yield return www.SendWebRequest();
byte[] results = www.downloadHandler.data; //二进制流读取
File.WriteAllBytes("D:/download/ABtest/AB/download/yubel", results); //写入本地
ToolVerify.ABEncypt(ref results);
AssetBundle ab = AssetBundle.LoadFromMemory(results);
GameObject moban = ab.LoadAsset<GameObject>("yu");
GameObject temp = Instantiate(moban, transform);
temp.transform.localPosition = Vector3.zero;
}