释放dll的textasset

main
pengjunwu 2024-02-05 16:43:42 +08:00
parent d63bb25507
commit dfbeea141a
1 changed files with 1 additions and 5 deletions

View File

@ -143,19 +143,15 @@ public class GameLauncher : MonoBehaviour
{
//如果服务器上的catalog和本地不一致则覆盖上一次需要下载的被内容
var jsonStr = JsonUtility.ToJson(_downloadContent);
Debug.Log($"set download json:{jsonStr}");
PlayerPrefs.SetString(DOWNLOAD_CATALOGS_ID, jsonStr);
PlayerPrefs.Save();
}
else
{
Debug.Log($"try to get last download json");
if (PlayerPrefs.HasKey(DOWNLOAD_CATALOGS_ID))
{
var jsonStr = PlayerPrefs.GetString(DOWNLOAD_CATALOGS_ID);
Debug.Log($"try to get last download json:{jsonStr}");
JsonUtility.FromJsonOverwrite(jsonStr, _downloadContent);
Debug.Log($"catalog count:{_downloadContent.catalogs.Count}");
}
}
@ -443,8 +439,8 @@ public class GameLauncher : MonoBehaviour
Debug.LogError(
$"cant load dll,exception:{op.OperationException.Message}\r\n{op.OperationException.StackTrace}");
_dllBytes = null;
yield break;
}
Addressables.Release(op);
}
private IEnumerator LoadSingleHotUpdateAssembly(string dllName)