Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

更新AssetBundle文档 #697

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Design/UsingAssetBundle.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static void Build()
```c#
UnityWebRequest request = UnityWebRequestAssetBundle.GetAssetBundle(uriPath);
yield return request.SendWebRequest();
if (request.isHttpError)
if (request.isNetworkError || request.isHttpError)
{
Debug.LogError(GetType() + "/ERROR/" + request.error);
}
Expand All @@ -46,7 +46,7 @@ public static void Build()
DownloadHandlerAssetBundle handler = new DownloadHandlerAssetBundle(www.uri.ToString(), 0);
www.downloadHandler = handler;
yield return www.Send();
if (www.isHttpError)
if (www.isNetworkError || www.isHttpError)
{
Debug.LogError(GetType() + "/ERROR/" + www.error);
} else
Expand Down Expand Up @@ -106,7 +106,7 @@ public static void Build()
using WeChatWasm;
UnityWebRequest bundleReq = WXAssetBundle.GetAssetBundle(url); // UnityWebRequestAssetBundle => WXAssetBundle
yield return bundleReq.SendWebRequest();
if (bundleReq.isHttpError)
if (bundleReq.isNetworkError || bundleReq.isHttpError)
{
Debug.LogError(GetType() + "/ERROR/" + bundleReq.error);
}
Expand Down