Skip to content

Commit 99395a0

Browse files
committed
fixed StreamingAssetsHelper request bug (v3.1.1)
1 parent d002019 commit 99395a0

3 files changed

Lines changed: 14 additions & 8 deletions

File tree

Assets/OxGFrame/AssetLoader/Scripts/Runtime/Bundle/YooAssets/StreamingAssetsHelper/StreamingAssetsHelper.cs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,17 @@ private async static UniTask<bool> _WebRequestPartialBytes(string url)
124124
return true;
125125
}
126126
}
127-
catch (OperationCanceledException ex)
127+
catch (OperationCanceledException ex) when (ex.CancellationToken == cts.Token)
128128
{
129-
if (ex.CancellationToken == cts.Token)
130-
{
131-
Logging.PrintWarning<Logger>("【Try Query Builtin-Package】Request timed out");
132-
request.Dispose();
133-
return false;
134-
}
129+
Logging.PrintWarning<Logger>("【Try Query Builtin-Package】Request timed out");
130+
request.Dispose();
131+
return false;
132+
}
133+
catch (Exception ex)
134+
{
135+
Logging.PrintWarning<Logger>($"【Try Query Builtin-Package】Request failed (Package doesn't exist) The package may not exist: {ex}");
136+
request.Dispose();
137+
return false;
135138
}
136139

137140
return false;

Assets/OxGFrame/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# CHANGELOG
22

3+
## [3.1.1] - 2025-03-18
4+
- Fixed an issue where StreamingAssets WebRequest did not catch 404 errors.
5+
36
## [3.1.0] - 2025-03-18
47
- Modified StreamingAssetsHelper to dynamically detect built-in resources (by checking if the BuildinCatalog.bytes file exists in the Package folder, indicating that the package is present).
58
- Modified the code in YooAssetBridge.

Assets/OxGFrame/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "com.michaelo.oxgframe",
33
"displayName": "OxGFrame",
44
"description": "The OxGFrame is a framework based on Unity for accelerating game development. Supports multi-platform Win, OSX, Android, iOS, WebGL.",
5-
"version": "3.1.0",
5+
"version": "3.1.1",
66
"unity": "2021.3",
77
"license": "MIT",
88
"samples": [

0 commit comments

Comments
 (0)