mirror of https://github.com/tuyoogame/YooAsset
fix #498
parent
772ba484eb
commit
8ccd7e552c
|
@ -239,6 +239,11 @@ namespace YooAsset
|
||||||
if (Exists(bundle) == false)
|
if (Exists(bundle) == false)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
|
#if UNITY_ANDROID
|
||||||
|
//TODO : 安卓平台内置文件属于APK压缩包内的文件。
|
||||||
|
YooLogger.Error($"Android platform not support read buildin bundle file data !");
|
||||||
|
return null;
|
||||||
|
#else
|
||||||
if (bundle.Encrypted)
|
if (bundle.Encrypted)
|
||||||
{
|
{
|
||||||
if (DecryptionServices == null)
|
if (DecryptionServices == null)
|
||||||
|
@ -261,6 +266,7 @@ namespace YooAsset
|
||||||
string filePath = GetBuildinFileLoadPath(bundle);
|
string filePath = GetBuildinFileLoadPath(bundle);
|
||||||
return FileUtility.ReadAllBytes(filePath);
|
return FileUtility.ReadAllBytes(filePath);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
public virtual string ReadBundleFileText(PackageBundle bundle)
|
public virtual string ReadBundleFileText(PackageBundle bundle)
|
||||||
{
|
{
|
||||||
|
@ -270,6 +276,11 @@ namespace YooAsset
|
||||||
if (Exists(bundle) == false)
|
if (Exists(bundle) == false)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
|
#if UNITY_ANDROID
|
||||||
|
//TODO : 安卓平台内置文件属于APK压缩包内的文件。
|
||||||
|
YooLogger.Error($"Android platform not support read buildin bundle file text !");
|
||||||
|
return null;
|
||||||
|
#else
|
||||||
if (bundle.Encrypted)
|
if (bundle.Encrypted)
|
||||||
{
|
{
|
||||||
if (DecryptionServices == null)
|
if (DecryptionServices == null)
|
||||||
|
@ -292,6 +303,7 @@ namespace YooAsset
|
||||||
string filePath = GetBuildinFileLoadPath(bundle);
|
string filePath = GetBuildinFileLoadPath(bundle);
|
||||||
return FileUtility.ReadAllText(filePath);
|
return FileUtility.ReadAllText(filePath);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#region 内部方法
|
#region 内部方法
|
||||||
|
|
|
@ -176,6 +176,12 @@ namespace YooAsset
|
||||||
|
|
||||||
if (_steps == ESteps.LoadBuildinRawBundle)
|
if (_steps == ESteps.LoadBuildinRawBundle)
|
||||||
{
|
{
|
||||||
|
#if UNITY_ANDROID
|
||||||
|
//TODO : 安卓平台内置文件属于APK压缩包内的文件。
|
||||||
|
_steps = ESteps.Done;
|
||||||
|
Result = new RawBundleResult(_fileSystem, _bundle);
|
||||||
|
Status = EOperationStatus.Succeed;
|
||||||
|
#else
|
||||||
string filePath = _fileSystem.GetBuildinFileLoadPath(_bundle);
|
string filePath = _fileSystem.GetBuildinFileLoadPath(_bundle);
|
||||||
if (File.Exists(filePath))
|
if (File.Exists(filePath))
|
||||||
{
|
{
|
||||||
|
@ -190,6 +196,7 @@ namespace YooAsset
|
||||||
Error = $"Can not found buildin raw bundle file : {filePath}";
|
Error = $"Can not found buildin raw bundle file : {filePath}";
|
||||||
YooLogger.Error(Error);
|
YooLogger.Error(Error);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
internal override void InternalWaitForAsyncComplete()
|
internal override void InternalWaitForAsyncComplete()
|
||||||
|
|
Loading…
Reference in New Issue