Skip to content

Commit 86002d7

Browse files
committed
upgraded to v3.3.2
1 parent 00425a2 commit 86002d7

139 files changed

Lines changed: 3353 additions & 968 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -881,7 +881,7 @@ public static async UniTask<bool> BeginDownloadWithCombineDownloaders(ResourceDo
881881
#endregion
882882

883883
/// <summary>
884-
/// Release packages
884+
/// Release all packages and bundle settings for quit game
885885
/// </summary>
886886
public async static UniTask Release()
887887
{

Assets/OxGFrame/AssetLoader/Scripts/Runtime/Bundle/BundleConfig.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,11 @@ internal static void InitDecryptInfo(string args, SecuredStringType securedType,
208208
internal static void ReleaseSecuredString()
209209
{
210210
if (_decryptArgs != null)
211+
{
211212
foreach (var decryptArg in _decryptArgs)
212213
decryptArg.Dispose();
214+
_decryptArgs = null;
215+
}
213216
}
214217
#endregion
215218

Assets/OxGFrame/AssetLoader/Scripts/Runtime/Bundle/PackageManager.cs

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -930,12 +930,20 @@ public static ResourceDownloaderOperation GetPackageDownloaderByAssetInfos(Resou
930930
/// </summary>
931931
public async static UniTask Release()
932932
{
933-
isReleased = true;
934-
var packages = YooAssets.GetAllPackages();
935-
foreach (var package in packages)
933+
if (!isReleased)
936934
{
937-
await package.DestroyAsync();
938-
YooAssets.RemovePackage(package);
935+
isReleased = true;
936+
937+
// 遍歷卸載
938+
var packages = YooAssets.GetAllPackages();
939+
foreach (var package in packages)
940+
{
941+
await package.DestroyAsync();
942+
YooAssets.RemovePackage(package);
943+
}
944+
945+
// 強制銷毀
946+
YooAssets.Destroy();
939947
}
940948
}
941949

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,13 @@ public DecryptResult LoadAssetBundleAsync(DecryptFileInfo fileInfo)
8181
return result;
8282
}
8383

84+
public DecryptResult LoadAssetBundleFallback(DecryptFileInfo fileInfo)
85+
{
86+
DecryptResult result = new DecryptResult();
87+
result.Result = AssetBundle.LoadFromMemory(this.DecryptData(fileInfo), fileInfo.FileLoadCRC);
88+
return result;
89+
}
90+
8491
public byte[] ReadFileData(DecryptFileInfo fileInfo)
8592
{
8693
return this.DecryptData(fileInfo);

Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/CHANGELOG.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,95 @@
22

33
All notable changes to this package will be documented in this file.
44

5+
## [2.3.10] - 2025-06-17
6+
7+
### Improvements
8+
9+
- 小游戏扩展库已经独立,可以单独导入到项目工程。
10+
- 编辑器里的TableView视图新增了AssetObjectCell类。
11+
- (#552) 微信小游戏文件系统类,增加了URL合法性的初始化检测机制。
12+
- (#566) 重构了资源构建页面,方便扩展自定义界面。
13+
- (#573) 完善了AssetDependencyDB的输出日志,可以正确输出丢失的引用资产信息。
14+
15+
### Fixed
16+
17+
- 修复太空战机DEMO在退出运行模式时的报错。
18+
- (#551) 修复了Unity2019, Unity2020的代码兼容性报错。
19+
- (#569) 修复了TVOS平台的兼容问题。
20+
- (#564) 修复了TiktokFileSystem文件系统里appendTimeTicks无效的问题。
21+
22+
### Added
23+
24+
- (#562) 新增了解密方法。
25+
26+
```csharp
27+
public interface IDecryptionServices
28+
{
29+
/// <summary>
30+
/// 后备方式获取解密的资源包对象
31+
/// 注意:当正常解密方法失败后,会触发后备加载!
32+
/// 说明:建议通过LoadFromMemory()方法加载资源对象作为保底机制。
33+
/// issues : https://github.com/tuyoogame/YooAsset/issues/562
34+
/// </summary>
35+
DecryptResult LoadAssetBundleFallback(DecryptFileInfo fileInfo);
36+
}
37+
```
38+
39+
40+
41+
## [2.3.9] - 2025-05-13
42+
43+
### Improvements
44+
45+
- 增加了YOO_ASSET_EXPERIMENT宏,用于控制实验性代码的开关。
46+
- 构建管线目前会输出构建日志到输出目录下,方便查看引擎在构建时主动清空的控制台日志。
47+
- 优化了收集器tag传染扩散逻辑,避免Group里配置了Tag导致的无意义的警告信息。
48+
- 扩展工程内PanelMonitor代码默认关闭状态。
49+
50+
### Fixed
51+
52+
- (#528) 修复了AssetDependencyDatabase在查询引擎资源对象是否存在的时效问题。
53+
54+
### Added
55+
56+
- (#542) 新增了资源管理系统销毁方法。
57+
58+
该方法会销毁所有的资源包裹和异步操作任务,以及卸载所有AssetBundle对象!
59+
60+
```csharp
61+
public class YooAssets
62+
{
63+
/// <summary>
64+
/// 销毁资源系统
65+
/// </summary>
66+
public static void Destroy();
67+
}
68+
```
69+
70+
- 新增了SBP构建管线的构建参数
71+
72+
```csharp
73+
/// <summary>
74+
/// 从AssetBundle文件头里剥离Unity版本信息
75+
/// </summary>
76+
public bool StripUnityVersion = false;
77+
```
78+
79+
- 新增了构建错误码:BuiltinShadersBundleNameIsNull
80+
81+
## [2.3.8] - 2025-04-17
82+
83+
### Improvements
84+
85+
- 扩展工程里增加了“图集丢失变白块的解决方案”的相关代码。
86+
87+
### Fixed
88+
89+
- (#528) 修复了微信小游戏平台WXFSClearUnusedBundleFiles无法清理的问题。
90+
- (#531) 修复了微信小游戏平台WXFSClearUnusedBundleFiles没有适配BundleName_HashName命名方式。
91+
- (#533) 修复了Editor程序集下无法访问YooAsset.Editor程序集里的internal字段的问题。
92+
- (#534) 修复了资源报告窗口AssetView视图里,依赖资源包列表显示不准确的问题。
93+
594
## [2.3.7] - 2025-04-01
695

796
### Improvements
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
using System.Runtime.CompilerServices;
2+
3+
// 外部友元
4+
[assembly: InternalsVisibleTo("YooAsset.EditorExtension")]
5+
[assembly: InternalsVisibleTo("Assembly-CSharp-Editor")]

Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Editor/Assembly/AssemblyInfo.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Editor/Assembly/MacroDefine.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System.Collections.Generic;
22

3+
#if YOO_ASSET_EXPERIMENT
34
namespace YooAsset.Editor
45
{
56
public class MacroDefine
@@ -15,3 +16,4 @@ public class MacroDefine
1516
};
1617
}
1718
}
19+
#endif

Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Editor/Assembly/MacroProcessor.cs

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.Xml;
66
using UnityEditor;
77

8+
#if YOO_ASSET_EXPERIMENT
89
namespace YooAsset.Editor
910
{
1011
[InitializeOnLoad]
@@ -22,13 +23,21 @@ static string OnGeneratedCSProject(string path, string content)
2223
return content;
2324

2425
// 将修改后的XML结构重新输出为文本
25-
var stringWriter = new StringWriter();
26-
var writerSettings = new XmlWriterSettings();
27-
writerSettings.Indent = true;
28-
var xmlWriter = XmlWriter.Create(stringWriter, writerSettings);
29-
xmlDoc.WriteTo(xmlWriter);
30-
xmlWriter.Flush();
31-
return stringWriter.ToString();
26+
using (var memoryStream = new MemoryStream())
27+
{
28+
var writerSettings = new XmlWriterSettings
29+
{
30+
Indent = true,
31+
Encoding = new UTF8Encoding(false), //无BOM
32+
OmitXmlDeclaration = false
33+
};
34+
35+
using (var xmlWriter = XmlWriter.Create(memoryStream, writerSettings))
36+
{
37+
xmlDoc.Save(xmlWriter);
38+
}
39+
return Encoding.UTF8.GetString(memoryStream.ToArray());
40+
}
3241
}
3342

3443
/// <summary>
@@ -94,3 +103,4 @@ private static bool IsCSProjectReferenced(XmlElement element)
94103
}
95104
}
96105
}
106+
#endif

Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Editor/AssetArtReporter/AssetArtReporterWindow.cs

Lines changed: 52 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,32 @@ public void ImportSingleReprotFile(string filePath)
196196
}
197197
}
198198

199+
/// <summary>
200+
/// 导入单个报告对象
201+
/// </summary>
202+
public void ImportSingleReprotFile(ScanReport report)
203+
{
204+
_reportCombiner = new ScanReportCombiner();
205+
206+
try
207+
{
208+
_reportCombiner.Combine(report);
209+
210+
// 刷新页面
211+
RefreshToolbar();
212+
FillTableView();
213+
RebuildView();
214+
}
215+
catch (System.Exception e)
216+
{
217+
_reportCombiner = null;
218+
_titleLabel.text = "导入报告失败!";
219+
_descLabel.text = e.Message;
220+
UnityEngine.Debug.LogError(e.StackTrace);
221+
}
222+
}
223+
224+
199225
private void ImportSingleBtn_clicked()
200226
{
201227
string selectFilePath = EditorUtility.OpenFilePanel("导入报告", _lastestOpenFolder, "json");
@@ -446,15 +472,31 @@ private void FillTableView()
446472
var column = new TableColumn(header.HeaderTitle, header.HeaderTitle, columnStyle);
447473
column.MakeCell = () =>
448474
{
449-
var label = new Label();
450-
label.style.marginLeft = 3f;
451-
label.style.unityTextAlign = TextAnchor.MiddleLeft;
452-
return label;
475+
if (header.HeaderType == EHeaderType.AssetObject)
476+
{
477+
var objectFiled = new ObjectField();
478+
return objectFiled;
479+
}
480+
else
481+
{
482+
var label = new Label();
483+
label.style.marginLeft = 3f;
484+
label.style.unityTextAlign = TextAnchor.MiddleLeft;
485+
return label;
486+
}
453487
};
454488
column.BindCell = (VisualElement element, ITableData data, ITableCell cell) =>
455489
{
456-
var infoLabel = element as Label;
457-
infoLabel.text = (string)cell.GetDisplayObject();
490+
if (header.HeaderType == EHeaderType.AssetObject)
491+
{
492+
var objectFiled = element as ObjectField;
493+
objectFiled.value = (UnityEngine.Object)cell.GetDisplayObject();
494+
}
495+
else
496+
{
497+
var infoLabel = element as Label;
498+
infoLabel.text = (string)cell.GetDisplayObject();
499+
}
458500
};
459501
_elementTableView.AddColumn(column);
460502
}
@@ -480,6 +522,10 @@ private void FillTableView()
480522
{
481523
tableData.AddAssetPathCell(scanInfo.HeaderTitle, scanInfo.ScanInfo);
482524
}
525+
else if (header.HeaderType == EHeaderType.AssetObject)
526+
{
527+
tableData.AddAssetObjectCell(scanInfo.HeaderTitle, scanInfo.ScanInfo);
528+
}
483529
else if (header.HeaderType == EHeaderType.StringValue)
484530
{
485531
tableData.AddStringValueCell(scanInfo.HeaderTitle, scanInfo.ScanInfo);

0 commit comments

Comments
 (0)