Load assets via Stream
* Load assets via Stream, Compatible with new versions of unencrypted DB
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user