Skip to content

Commit 302aff8

Browse files
author
Jiang Yin
committed
修正选择多个平台同时构建AssetBundle时报错的问题(QQ827269283上报)
1 parent f1e2ef5 commit 302aff8

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

Scripts/Editor/ResourceBuilder/ResourceBuilderController.cs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -879,9 +879,6 @@ private bool BuildResources(Platform platform, AssetBundleBuild[] assetBundleBui
879879

880880
// Build AssetBundles
881881
m_BuildReport.LogInfo("Unity start build asset bundles for '{0}'...", platformName);
882-
883-
UseEncrytion(ref buildAssetBundleOptions);
884-
885882
AssetBundleManifest assetBundleManifest = BuildPipeline.BuildAssetBundles(workingPath, assetBundleBuildDatas, buildAssetBundleOptions, GetBuildTarget(platform));
886883
if (assetBundleManifest == null)
887884
{
@@ -1614,23 +1611,5 @@ private static string GetExtension(ResourceData data)
16141611

16151612
return DefaultExtension;
16161613
}
1617-
1618-
private void UseEncrytion(ref BuildAssetBundleOptions buildAssetBundleOptions)
1619-
{
1620-
m_BuildReport.LogInfo("Encrytion is {0}", EditorPrefs.GetBool("Encryption"));
1621-
System.Reflection.MethodInfo method = typeof(BuildPipeline).GetMethod("SetAssetBundleEncryptKey", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.Public);
1622-
if (method != null)
1623-
{
1624-
if (EditorPrefs.HasKey("Encryption") && EditorPrefs.GetBool("Encryption"))
1625-
{
1626-
method.Invoke(null, new object[] { "0123456789abcdef" });
1627-
buildAssetBundleOptions |= (BuildAssetBundleOptions)Enum.Parse(typeof(BuildAssetBundleOptions), "EnableProtection");
1628-
}
1629-
else
1630-
{
1631-
method.Invoke(null, new object[] { null });
1632-
}
1633-
}
1634-
}
16351614
}
16361615
}

0 commit comments

Comments
 (0)