diff --git a/Docs/AssetBuilder.md b/Docs/AssetBuilder.md
index af567dd..c50ba6b 100644
--- a/Docs/AssetBuilder.md
+++ b/Docs/AssetBuilder.md
@@ -16,6 +16,14 @@
资源包的压缩方式。
+- **Encryption Services**
+
+ 加密服务类列表。
+
+- **Redundancy Services**
+
+ 冗余服务类列表。
+
- **Append Extension**
构建的资源包文件名是否包含后缀格式。
@@ -37,14 +45,15 @@
编写继承IAssetEncrypter接口的加密类。注意:加密类文件需要放置在Editor文件夹里。
````C#
+using System;
using YooAsset.Editor;
-public class AssetEncrypter : IAssetEncrypter
+public class GameEncryption : IEncryptionServices
{
///
/// 检测资源包是否需要加密
///
- bool IAssetEncrypter.Check(string filePath)
+ bool IEncryptionServices.Check(string filePath)
{
// 对配置表相关的资源包进行加密
return filePath.Contains("Assets/Config/");
@@ -53,7 +62,7 @@ public class AssetEncrypter : IAssetEncrypter
///
/// 对数据进行加密,并返回加密后的数据
///
- byte[] IAssetEncrypter.Encrypt(byte[] fileData)
+ byte[] IEncryptionServices.Encrypt(byte[] fileData)
{
int offset = 32;
var temper = new byte[fileData.Length + offset];
@@ -67,7 +76,9 @@ public class AssetEncrypter : IAssetEncrypter
构建成功后会在输出目录下找到补丁包文件夹,该文件夹名称为本次构建时指定的资源版本号。
-补丁包文件夹里包含补丁清单和资源包文件以及说明文件,资源包文件都是以文件的哈希值命名。
+补丁包文件夹里包含补丁清单文件,资源包文件,构建报告文件等。
+
+资源包文件都是以文件的哈希值命名。
![image](https://github.com/tuyoogame/YooAsset/raw/main/Docs/Image/AssetBuilder-img4.jpg)
@@ -86,11 +97,8 @@ private static void BuildInternal(BuildTarget buildTarget)
{
Debug.Log($"开始构建 : {buildTarget}");
- // 打印命令行参数
+ // 命令行参数
int buildVersion = GetBuildVersion();
- bool isForceBuild = IsForceBuild();
- Debug.Log($"资源版本 : {buildVersion}");
- Debug.Log($"强制重建 : {isForceBuild}");
// 构建参数
string defaultOutputRoot = AssetBundleBuilderHelper.GetDefaultOutputRoot();
@@ -101,7 +109,9 @@ private static void BuildInternal(BuildTarget buildTarget)
buildParameters.BuildVersion = buildVersion;
buildParameters.CompressOption = ECompressOption.LZ4;
buildParameters.AppendFileExtension = false;
- buildParameters.IsForceRebuild = isForceBuild;
+ buildParameters.EncryptionServices = new GameEncryption();
+ buildParameters.RedundancyServices = null;
+ buildParameters.IsForceRebuild = true;
buildParameters.BuildinTags = "buildin";
// 执行构建
@@ -122,14 +132,5 @@ private static int GetBuildVersion()
}
return -1;
}
-private static bool IsForceBuild()
-{
- foreach (string arg in System.Environment.GetCommandLineArgs())
- {
- if (arg.StartsWith("forceBuild"))
- return arg.Split("="[0])[1] == "true" ? true : false;
- }
- return false;
-}
````
diff --git a/Docs/CodeTutorial3.md b/Docs/CodeTutorial3.md
index f16197b..61e39f3 100644
--- a/Docs/CodeTutorial3.md
+++ b/Docs/CodeTutorial3.md
@@ -121,9 +121,9 @@ IEnumerator Start()
IEnumerator Start()
{
string location = "wwise/init.bnk";
- string savePath = $"{Application.persistentDataPath}/Audio/init.bnk"
+ string savePath = $"{Application.persistentDataPath}/Audio/init.bnk";
RawFileOperation operation = YooAssets.LoadRawFileAsync(location, savePath);
- yield return operation;
+ yield return operation;
byte[] fileData = operation.GetFileData();
string fileText = operation.GetFileText();
}
diff --git a/Docs/Image/AssetBuilder-img1.jpg b/Docs/Image/AssetBuilder-img1.jpg
index c80c37b..aa6e475 100644
Binary files a/Docs/Image/AssetBuilder-img1.jpg and b/Docs/Image/AssetBuilder-img1.jpg differ
diff --git a/Docs/Image/AssetBuilder-img4.jpg b/Docs/Image/AssetBuilder-img4.jpg
index 62963d9..3c90c2f 100644
Binary files a/Docs/Image/AssetBuilder-img4.jpg and b/Docs/Image/AssetBuilder-img4.jpg differ
diff --git a/Docs/Image/Settings-img1.jpg b/Docs/Image/Settings-img1.jpg
index 321cd78..f9e2fee 100644
Binary files a/Docs/Image/Settings-img1.jpg and b/Docs/Image/Settings-img1.jpg differ
diff --git a/Docs/Settings.md b/Docs/Settings.md
index 7446c0b..0efdeb8 100644
--- a/Docs/Settings.md
+++ b/Docs/Settings.md
@@ -10,11 +10,7 @@
- **Asset Bundle File Variant** : AssetBundle资源包后缀名
- **Raw File Variant** : 原生资源包后缀名
-
- **Patch Manifest File Name** : 补丁清单文件名
-
- **Patch Manifest Hash File Name** : 补丁清单哈希文件名
-
- **Unity Manifest File Name** : Unity构建的清单名称
-- **Readme File Name** : 说明文件名称