diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilderWindow.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilderWindow.cs index e78e821..d688887 100644 --- a/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilderWindow.cs +++ b/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilderWindow.cs @@ -60,7 +60,7 @@ namespace YooAsset.Editor // 加密服务类 _encryptionServicesClassTypes = GetEncryptionServicesClassTypes(); - _encryptionServicesClassNames = _encryptionServicesClassTypes.Select(t => t.FullName).ToList(); + _encryptionServicesClassNames = _encryptionServicesClassTypes.Select(t => t.Name).ToList(); // 输出目录 string defaultOutputRoot = AssetBundleBuilderHelper.GetDefaultOutputRoot(); diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskEncryption.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskEncryption.cs index 8172467..a393635 100644 --- a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskEncryption.cs +++ b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskEncryption.cs @@ -27,17 +27,16 @@ namespace YooAsset.Editor private void EncryptingBundleFiles(BuildParametersContext buildParametersContext, BuildMapContext buildMapContext) { var encryptionServices = buildParametersContext.Parameters.EncryptionServices; - - // 如果没有设置加密类 if (encryptionServices == null) return; + if (encryptionServices.GetType() == typeof(EncryptionNone)) + return; + int progressValue = 0; string pipelineOutputDirectory = buildParametersContext.GetPipelineOutputDirectory(); foreach (var bundleInfo in buildMapContext.BundleInfos) { - bundleInfo.LoadMethod = EBundleLoadMethod.Normal; - EncryptFileInfo fileInfo = new EncryptFileInfo(); fileInfo.BundleName = bundleInfo.BundleName; fileInfo.FilePath = $"{pipelineOutputDirectory}/{bundleInfo.BundleName}"; diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/DefaultEncryption.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/DefaultEncryption.cs new file mode 100644 index 0000000..44f5053 --- /dev/null +++ b/Assets/YooAsset/Editor/AssetBundleBuilder/DefaultEncryption.cs @@ -0,0 +1,11 @@ + +namespace YooAsset.Editor +{ + public class EncryptionNone : IEncryptionServices + { + public EncryptResult Encrypt(EncryptFileInfo fileInfo) + { + throw new System.NotImplementedException(); + } + } +} \ No newline at end of file diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/DefaultEncryption.cs.meta b/Assets/YooAsset/Editor/AssetBundleBuilder/DefaultEncryption.cs.meta new file mode 100644 index 0000000..3c666d3 --- /dev/null +++ b/Assets/YooAsset/Editor/AssetBundleBuilder/DefaultEncryption.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 46b8b200b841799498896403d9d427c2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: