mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-18 14:00:18 +00:00
Support fast build mode.
支持快速构建模式,真实的实现EditorPlayMode的运行时环境。
This commit is contained in:
@@ -27,16 +27,17 @@ namespace YooAsset.Editor
|
||||
var buildParameters = context.GetContextObject<AssetBundleBuilder.BuildParametersContext>();
|
||||
var buildMapContext = context.GetContextObject<BuildMapContext>();
|
||||
|
||||
if (buildParameters.Parameters.DryRunBuild)
|
||||
var buildMode = buildParameters.Parameters.BuildMode;
|
||||
if (buildMode == EBuildMode.ForceRebuild || buildMode == EBuildMode.IncrementalBuild)
|
||||
{
|
||||
EncryptionContext encryptionContext = new EncryptionContext();
|
||||
encryptionContext.EncryptList = new List<string>();
|
||||
encryptionContext.EncryptList = EncryptFiles(buildParameters, buildMapContext);
|
||||
context.SetContextObject(encryptionContext);
|
||||
}
|
||||
else
|
||||
{
|
||||
EncryptionContext encryptionContext = new EncryptionContext();
|
||||
encryptionContext.EncryptList = EncryptFiles(buildParameters, buildMapContext);
|
||||
encryptionContext.EncryptList = new List<string>();
|
||||
context.SetContextObject(encryptionContext);
|
||||
}
|
||||
}
|
||||
@@ -75,7 +76,7 @@ namespace YooAsset.Editor
|
||||
{
|
||||
byte[] bytes = encryptionServices.Encrypt(fileData);
|
||||
File.WriteAllBytes(filePath, bytes);
|
||||
UnityEngine.Debug.Log($"文件加密完成:{filePath}");
|
||||
BuildRunner.Log($"文件加密完成:{filePath}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user