【AB加密】修复游戏内无法加载files文件的问题,优化splashpanel的判断方式

dev_chengFeng
JLIOSM1 2021-12-06 13:21:05 +08:00 committed by zhangshanxue
parent 28dbfe57eb
commit 2714a8c8f6
2 changed files with 3 additions and 3 deletions

View File

@ -59,7 +59,7 @@ namespace GameLogic {
public static void EncyptAB(string path, string key)
{
// 闪屏先不加密了
if (Path.GetFileName(path).Equals("splashpanel.unity3d"))
if (Path.GetFileName(path).Contains("splashpanel"))
{
return;
}

View File

@ -519,7 +519,7 @@ namespace ResUpdate
/// </summary>
List<ResourceFile> GetNewResourceFiles()
{
AssetBundle bundle = MEncyptUtil.LoadAssetBundle(UpdateConfigs.PersistentDataPath + UpdateConfigs.FILES, "", 0);
AssetBundle bundle = MEncyptUtil.LoadAssetBundle(UpdateConfigs.PersistentDataPath + UpdateConfigs.FILES, AppConst.EncyptKey, 0);
ResourceFiles files = bundle.LoadAsset<ResourceFiles>("game");
List<ResourceFile> list = files.files;
bundle.Unload(true);
@ -532,7 +532,7 @@ namespace ResUpdate
/// <returns></returns>
List<ResourceFile> GetStreamResourceFiles()
{
AssetBundle bundle = MEncyptUtil.LoadAssetBundle(UpdateConfigs.StreamPath + UpdateConfigs.FILES, "", 0);
AssetBundle bundle = MEncyptUtil.LoadAssetBundle(UpdateConfigs.StreamPath + UpdateConfigs.FILES, AppConst.EncyptKey, 0);
if (bundle != null)
{
ResourceFiles files = bundle.LoadAsset<ResourceFiles>("game");