Load assets via Stream

* Load assets via Stream, Compatible with new versions of unencrypted DB
This commit is contained in:
Ji O
2025-10-04 06:21:48 +09:00
committed by GitHub
parent eb35f2db0f
commit 5351f82f09
6 changed files with 116 additions and 41 deletions
+2 -3
View File
@@ -133,14 +133,13 @@ public class UmaAssetManager : MonoBehaviour
else
{
AssetBundle bundle;
if (string.IsNullOrEmpty(entry.Key) || long.Parse(entry.Key) == 0)
if (entry.Key == 0)
{
bundle = AssetBundle.LoadFromFile(filePath);
}
else
{
var data = AssetBundleDecryptor.DecryptFileToBytes(filePath, entry.FKey);
bundle = AssetBundle.LoadFromMemory(data);
bundle = AssetBundle.LoadFromStream(new UmaAssetBundleStream(filePath, entry.FKey));
}
if (!bundle)
{