Skip to content

Commit 1d39e1e

Browse files
committed
updated to v3.6.1 (critical fixes)
1 parent f75ecb4 commit 1d39e1e

12 files changed

Lines changed: 233 additions & 239 deletions

File tree

Assets/OxGFrame/AssetLoader/Scripts/Runtime/AssetLoaders.cs

Lines changed: 184 additions & 186 deletions
Large diffs are not rendered by default.

Assets/OxGFrame/AssetLoader/Scripts/Runtime/GroupCacher/GroupBundle.cs

Lines changed: 15 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public async UniTask PreloadRawFileAsync(int id, string packageName, string[] as
3434
this.AddIntoCache(id, assetName);
3535
}
3636

37-
Logging.Print<Logger>($"【Preload】 => Current << {nameof(GroupBundle)} >> Cache Count: {this.Count}, GroupId: {id}");
37+
Logging.Print<Logger>($"【Preload RawFile with Group】 => Current << {nameof(GroupBundle)} >> Cache Count: {this.Count}, GroupId: {id}");
3838
}
3939

4040
public void PreloadRawFile(int id, string packageName, string[] assetNames, Progression progression, byte maxRetryCount)
@@ -51,20 +51,9 @@ public void PreloadRawFile(int id, string packageName, string[] assetNames, Prog
5151
this.AddIntoCache(id, assetName);
5252
}
5353

54-
Logging.Print<Logger>($"【Preload】 => Current << {nameof(GroupBundle)} >> Cache Count: {this.Count}, GroupId: {id}");
54+
Logging.Print<Logger>($"【Preload RawFile with Group】 => Current << {nameof(GroupBundle)} >> Cache Count: {this.Count}, GroupId: {id}");
5555
}
5656

57-
/// <summary>
58-
/// 【GroupBundle】資源加載
59-
/// </summary>
60-
/// <typeparam name="T"></typeparam>
61-
/// <param name="id"></param>
62-
/// <param name="packageName"></param>
63-
/// <param name="assetName"></param>
64-
/// <param name="priority"></param>
65-
/// <param name="progression"></param>
66-
/// <param name="maxRetryCount"></param>
67-
/// <returns></returns>
6857
public async UniTask<T> LoadRawFileAsync<T>(int id, string packageName, string assetName, uint priority, Progression progression, byte maxRetryCount)
6958
{
7059
T asset = default;
@@ -78,7 +67,7 @@ public async UniTask<T> LoadRawFileAsync<T>(int id, string packageName, string a
7867
if (keyGroup != null)
7968
{
8069
keyGroup.AddRef();
81-
Logging.Print<Logger>($"【Load】 => Current << {nameof(GroupBundle)} >> Cache Count: {this.Count}, KeyRef: {keyGroup.refCount}, GroupId: {id}");
70+
Logging.Print<Logger>($"【Load RawFile with Group】 => Current << {nameof(GroupBundle)} >> Cache Count: {this.Count}, KeyRef: {keyGroup.refCount}, GroupId: {id}");
8271
}
8372
}
8473

@@ -98,7 +87,7 @@ public T LoadRawFile<T>(int id, string packageName, string assetName, Progressio
9887
if (keyGroup != null)
9988
{
10089
keyGroup.AddRef();
101-
Logging.Print<Logger>($"【Load】 => Current << {nameof(GroupBundle)} >> Cache Count: {this.Count}, KeyRef: {keyGroup.refCount}, GroupId: {id}");
90+
Logging.Print<Logger>($"【Load RawFile with Group】 => Current << {nameof(GroupBundle)} >> Cache Count: {this.Count}, KeyRef: {keyGroup.refCount}, GroupId: {id}");
10291
}
10392
}
10493

@@ -111,13 +100,13 @@ public void UnloadRawFile(int id, string assetName)
111100
if (keyGroup != null)
112101
{
113102
keyGroup.DelRef();
114-
Logging.Print<Logger>($"【Unload with RefCount】 => Current << {nameof(GroupBundle)} >> Cache Count: {this.Count}, KeyRef: {keyGroup.refCount}, GroupId: {id}");
103+
Logging.Print<Logger>($"【Unload RawFile from Group】 => Decremented RefCount: {keyGroup.refCount}, Cache Count: {this.Count}, GroupId: {id}");
115104

116105
// 使用引用計數釋放
117106
if (keyGroup.refCount <= 0)
118107
{
119108
this.DelFromCache(id, keyGroup.assetName);
120-
Logging.Print<Logger>($"【Unload Completes with RefCount】 => Current << {nameof(GroupBundle)} >> Cache Count: {this.Count}, GroupId: {id}");
109+
Logging.Print<Logger>($"【Unload RawFile from Group Completed】 => RefCount reached 0, removed from cache. Cache Count: {this.Count}, GroupId: {id}");
121110
}
122111

123112
// 總是使用引用計數模式
@@ -144,7 +133,7 @@ public void UnloadRawFiles(int id)
144133
this.DelFromCache(keyGroup.id, keyGroup.assetName);
145134
}
146135

147-
Logging.Print<Logger>($"【Unload Group RawFiles with RefCount】 => Current << {nameof(GroupBundle)} >> Cache Count: {this.Count}, GroupId: {id}");
136+
Logging.Print<Logger>($"【Unload All RawFiles from Group】 => Released all references, Cache Count: {this.Count}, GroupId: {id}");
148137
}
149138
}
150139
#endregion
@@ -164,7 +153,7 @@ public async UniTask PreloadAssetAsync<T>(int id, string packageName, string[] a
164153
this.AddIntoCache(id, assetName);
165154
}
166155

167-
Logging.Print<Logger>($"【Preload】 => Current << {nameof(GroupBundle)} >> Cache Count: {this.Count}, GroupId: {id}");
156+
Logging.Print<Logger>($"【Preload Asset with Group】 => Current << {nameof(GroupBundle)} >> Cache Count: {this.Count}, GroupId: {id}");
168157
}
169158

170159
public void PreloadAsset<T>(int id, string packageName, string[] assetNames, Progression progression, byte maxRetryCount) where T : Object
@@ -181,20 +170,9 @@ public void PreloadAsset<T>(int id, string packageName, string[] assetNames, Pro
181170
this.AddIntoCache(id, assetName);
182171
}
183172

184-
Logging.Print<Logger>($"【Preload】 => Current << {nameof(GroupBundle)} >> Cache Count: {this.Count}, GroupId: {id}");
173+
Logging.Print<Logger>($"【Preload Asset with Group】 => Current << {nameof(GroupBundle)} >> Cache Count: {this.Count}, GroupId: {id}");
185174
}
186175

187-
/// <summary>
188-
/// 【GroupBundle】資源加載
189-
/// </summary>
190-
/// <typeparam name="T"></typeparam>
191-
/// <param name="id"></param>
192-
/// <param name="packageName"></param>
193-
/// <param name="assetName"></param>
194-
/// <param name="priority"></param>
195-
/// <param name="progression"></param>
196-
/// <param name="maxRetryCount"></param>
197-
/// <returns></returns>
198176
public async UniTask<T> LoadAssetAsync<T>(int id, string packageName, string assetName, uint priority, Progression progression, byte maxRetryCount) where T : Object
199177
{
200178
T asset = null;
@@ -208,7 +186,7 @@ public async UniTask<T> LoadAssetAsync<T>(int id, string packageName, string ass
208186
if (keyGroup != null)
209187
{
210188
keyGroup.AddRef();
211-
Logging.Print<Logger>($"【Load】 => Current << {nameof(GroupBundle)} >> Cache Count: {this.Count}, KeyRef: {keyGroup.refCount}, GroupId: {id}");
189+
Logging.Print<Logger>($"【Load Asset with Group】 => Current << {nameof(GroupBundle)} >> Cache Count: {this.Count}, KeyRef: {keyGroup.refCount}, GroupId: {id}");
212190
}
213191
}
214192

@@ -228,7 +206,7 @@ public T LoadAsset<T>(int id, string packageName, string assetName, Progression
228206
if (keyGroup != null)
229207
{
230208
keyGroup.AddRef();
231-
Logging.Print<Logger>($"【Load】 => Current << {nameof(GroupBundle)} >> Cache Count: {this.Count}, KeyRef: {keyGroup.refCount}, GroupId: {id}");
209+
Logging.Print<Logger>($"【Load Asset with Group】 => Current << {nameof(GroupBundle)} >> Cache Count: {this.Count}, KeyRef: {keyGroup.refCount}, GroupId: {id}");
232210
}
233211
}
234212

@@ -241,13 +219,13 @@ public void UnloadAsset(int id, string assetName)
241219
if (keyGroup != null)
242220
{
243221
keyGroup.DelRef();
244-
Logging.Print<Logger>($"【Unload with RefCount】 => Current << {nameof(GroupBundle)} >> Cache Count: {this.Count}, KeyRef: {keyGroup.refCount}, GroupId: {id}");
222+
Logging.Print<Logger>($"【Unload Asset from Group】 => Decremented RefCount: {keyGroup.refCount}, Cache Count: {this.Count}, GroupId: {id}");
245223

246224
// 使用引用計數釋放
247225
if (keyGroup.refCount <= 0)
248226
{
249227
this.DelFromCache(id, keyGroup.assetName);
250-
Logging.Print<Logger>($"【Unload Completes with RefCount】 => Current << {nameof(GroupBundle)} >> Cache Count: {this.Count}, GroupId: {id}");
228+
Logging.Print<Logger>($"【Unload Asset from Group Completed】 => RefCount reached 0, removed from cache. Cache Count: {this.Count}, GroupId: {id}");
251229
}
252230

253231
// 總是使用引用計數模式
@@ -274,9 +252,9 @@ public void UnloadAssets(int id)
274252
this.DelFromCache(keyGroup.id, keyGroup.assetName);
275253
}
276254

277-
Logging.Print<Logger>($"【Unload Group Assets with RefCount】 => Current << {nameof(GroupBundle)} >> Cache Count: {this.Count}, GroupId: {id}");
255+
Logging.Print<Logger>($"【Unload All Assets from Group】 => Released all references, Cache Count: {this.Count}, GroupId: {id}");
278256
}
279257
}
280258
#endregion
281259
}
282-
}
260+
}

Assets/OxGFrame/AssetLoader/Scripts/Runtime/GroupCacher/GroupResource.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public async UniTask PreloadAssetAsync<T>(int id, string[] assetNames, Progressi
3333
this.AddIntoCache(id, assetName);
3434
}
3535

36-
Logging.Print<Logger>($"【Preload】 => Current << {nameof(GroupResource)} >> Cache Count: {this.Count}, GroupId: {id}");
36+
Logging.Print<Logger>($"【Preload Asset with Group】 => Current << {nameof(GroupResource)} >> Cache Count: {this.Count}, GroupId: {id}");
3737
}
3838

3939
public void PreloadAsset<T>(int id, string[] assetNames, Progression progression, byte maxRetryCount) where T : Object
@@ -50,7 +50,7 @@ public void PreloadAsset<T>(int id, string[] assetNames, Progression progression
5050
this.AddIntoCache(id, assetName);
5151
}
5252

53-
Logging.Print<Logger>($"【Preload】 => Current << {nameof(GroupResource)} >> Cache Count: {this.Count}, GroupId: {id}");
53+
Logging.Print<Logger>($"【Preload Asset with Group】 => Current << {nameof(GroupResource)} >> Cache Count: {this.Count}, GroupId: {id}");
5454
}
5555

5656
/// <summary>
@@ -72,7 +72,7 @@ public async UniTask<T> LoadAssetAsync<T>(int id, string assetName, Progression
7272
if (keyGroup != null)
7373
{
7474
keyGroup.AddRef();
75-
Logging.Print<Logger>($"【Load】 => Current << {nameof(GroupResource)} >> Cache Count: {this.Count}, KeyRef: {keyGroup.refCount}, GroupId: {id}");
75+
Logging.Print<Logger>($"【Load Asset with Group】 => Current << {nameof(GroupResource)} >> Cache Count: {this.Count}, KeyRef: {keyGroup.refCount}, GroupId: {id}");
7676
}
7777
}
7878

@@ -92,7 +92,7 @@ public T LoadAsset<T>(int id, string assetName, Progression progression, byte ma
9292
if (keyGroup != null)
9393
{
9494
keyGroup.AddRef();
95-
Logging.Print<Logger>($"【Load】 => Current << {nameof(GroupResource)} >> Cache Count: {this.Count}, KeyRef: {keyGroup.refCount}, GroupId: {id}");
95+
Logging.Print<Logger>($"【Load Asset with Group】 => Current << {nameof(GroupResource)} >> Cache Count: {this.Count}, KeyRef: {keyGroup.refCount}, GroupId: {id}");
9696
}
9797
}
9898

@@ -105,13 +105,13 @@ public void UnloadAsset(int id, string assetName)
105105
if (keyGroup != null)
106106
{
107107
keyGroup.DelRef();
108-
Logging.Print<Logger>($"【Unload with RefCount】 => Current << {nameof(GroupResource)} >> Cache Count: {this.Count}, KeyRef: {keyGroup.refCount}, GroupId: {id}");
108+
Logging.Print<Logger>($"【Unload Asset from Group】 => Decremented RefCount: {keyGroup.refCount}, Cache Count: {this.Count}, GroupId: {id}");
109109

110110
// 使用引用計數釋放
111111
if (keyGroup.refCount <= 0)
112112
{
113113
this.DelFromCache(id, keyGroup.assetName);
114-
Logging.Print<Logger>($"【Unload Completes with RefCount】 => Current << {nameof(GroupResource)} >> Cache Count: {this.Count}, GroupId: {id}");
114+
Logging.Print<Logger>($"【Unload Asset from Group Completed】 => RefCount reached 0, removed from cache. Cache Count: {this.Count}, GroupId: {id}");
115115
}
116116

117117
// 總是使用引用計數模式
@@ -138,8 +138,8 @@ public void UnloadAssets(int id)
138138
this.DelFromCache(keyGroup.id, keyGroup.assetName);
139139
}
140140

141-
Logging.Print<Logger>($"【Unload Group Assets with RefCount】 => Current << {nameof(GroupResource)} >> Cache Count: {this.Count}, GroupId: {id}");
141+
Logging.Print<Logger>($"【Unload All Assets from Group】 => Released all references, Cache Count: {this.Count}, GroupId: {id}");
142142
}
143143
}
144144
}
145-
}
145+
}

Assets/OxGFrame/AssetLoader/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.assetloader",
33
"displayName": "OxGFrame.AssetLoader",
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.6.0",
5+
"version": "3.6.1",
66
"unity": "2021.3",
77
"license": "MIT",
88
"dependencies": {

Assets/OxGFrame/CHANGELOG.md

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

3+
## [3.6.1] - 2026-02-12
4+
5+
# English
6+
7+
- AssetLoader
8+
- ### Critical Fixes
9+
- Fixed an issue where the `Preload` series methods in `AssetLoaders` (using assetNames\[\] arrays) failed to correctly refine. Also added support for preloading mixed arrays containing both `Resources` and `Bundle` asset names.
10+
- ### Adjustments
11+
- Adjusted the log messaging for `GroupCache`.
12+
13+
# 中文
14+
15+
- AssetLoader
16+
- ### 緊急修正
17+
- 修正 AssetLoaders Preload 使用 assetNames\[\] 預加載的系列方法,未正確 refine 問題,並且修正支持可以混和 Resources 跟 Bundle 資源名稱數組進行預加載。
18+
- ### 調整
19+
- 調整 GroupCache 打印訊息。
20+
321
## [3.6.0] - 2026-02-12
422

523
# English

Assets/OxGFrame/CenterFrame/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.centerframe",
33
"displayName": "OxGFrame.CenterFrame",
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.6.0",
5+
"version": "3.6.1",
66
"unity": "2021.3",
77
"license": "MIT",
88
"dependencies": {

Assets/OxGFrame/CoreFrame/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.coreframe",
33
"displayName": "OxGFrame.CoreFrame",
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.6.0",
5+
"version": "3.6.1",
66
"unity": "2021.3",
77
"license": "MIT",
88
"dependencies": {

Assets/OxGFrame/GSIFrame/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.gsiframe",
33
"displayName": "OxGFrame.GSIFrame",
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.6.0",
5+
"version": "3.6.1",
66
"unity": "2021.3",
77
"license": "MIT",
88
"dependencies": {

Assets/OxGFrame/Hotfixer/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.hotfixer",
33
"displayName": "OxGFrame.Hotfixer",
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.6.0",
5+
"version": "3.6.1",
66
"unity": "2021.3",
77
"license": "MIT",
88
"dependencies": {

Assets/OxGFrame/MediaFrame/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.mediaframe",
33
"displayName": "OxGFrame.MediaFrame",
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.6.0",
5+
"version": "3.6.1",
66
"unity": "2021.3",
77
"license": "MIT",
88
"dependencies": {

0 commit comments

Comments
 (0)