mirror of https://github.com/tuyoogame/YooAsset
update file system
parent
54f585c67a
commit
0c77ef628f
|
@ -36,9 +36,21 @@ namespace YooAsset
|
|||
{
|
||||
int failedTryAgain = int.MaxValue;
|
||||
int timeout = 60;
|
||||
string mainURL = _fileSystem.RemoteServices.GetRemoteMainURL(_bundle.FileName);
|
||||
string fallbackURL = _fileSystem.RemoteServices.GetRemoteFallbackURL(_bundle.FileName);
|
||||
string mainURL;
|
||||
string fallbackURL;
|
||||
if (_fileSystem.AllowCrossAccess)
|
||||
{
|
||||
mainURL = _fileSystem.RemoteServices.GetRemoteMainURL(_bundle.FileName);
|
||||
fallbackURL = _fileSystem.RemoteServices.GetRemoteFallbackURL(_bundle.FileName);
|
||||
}
|
||||
else
|
||||
{
|
||||
string fileLoadPath = _fileSystem.GetWebFileLoadPath(_bundle);
|
||||
mainURL = DownloadSystemHelper.ConvertToWWWPath(fileLoadPath);
|
||||
fallbackURL = mainURL;
|
||||
}
|
||||
_downloadhanlderAssetBundleOp = new DownloadHandlerAssetBundleOperation(_fileSystem, _bundle, mainURL, fallbackURL, failedTryAgain, timeout);
|
||||
OperationSystem.StartOperation(_fileSystem.PackageName, _downloadhanlderAssetBundleOp);
|
||||
}
|
||||
|
||||
DownloadProgress = _downloadhanlderAssetBundleOp.DownloadProgress;
|
||||
|
|
|
@ -38,8 +38,19 @@ namespace YooAsset
|
|||
{
|
||||
string packageName = _fileSystem.PackageName;
|
||||
string fileName = YooAssetSettingsData.GetPackageVersionFileName(packageName);
|
||||
string mainURL = _fileSystem.RemoteServices.GetRemoteMainURL(fileName);
|
||||
string fallbackURL = _fileSystem.RemoteServices.GetRemoteFallbackURL(fileName);
|
||||
string mainURL;
|
||||
string fallbackURL;
|
||||
if (_fileSystem.AllowCrossAccess)
|
||||
{
|
||||
mainURL = _fileSystem.RemoteServices.GetRemoteMainURL(fileName);
|
||||
fallbackURL = _fileSystem.RemoteServices.GetRemoteFallbackURL(fileName);
|
||||
}
|
||||
else
|
||||
{
|
||||
string filePath = _fileSystem.GetWebPackageVersionFilePath();
|
||||
mainURL = DownloadSystemHelper.ConvertToWWWPath(filePath);
|
||||
fallbackURL = mainURL;
|
||||
}
|
||||
_getRemotePackageVersionOp = new DefaultGetRemotePackageVersionOperation(packageName, mainURL, fallbackURL, _appendTimeTicks, _timeout);
|
||||
OperationSystem.StartOperation(packageName, _getRemotePackageVersionOp);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
namespace YooAsset
|
||||
{
|
||||
public class SimulateBuildResult
|
||||
{
|
||||
public string PackageVersionFilePath;
|
||||
public string PackageManifestFilePath;
|
||||
public string PackageHashFilePath;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d80e7b3bcadc90148a3be4fc5b41d516
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -3,13 +3,6 @@ using System.Reflection;
|
|||
|
||||
namespace YooAsset
|
||||
{
|
||||
public class SimulateBuildResult
|
||||
{
|
||||
public string PackageVersionFilePath;
|
||||
public string PackageManifestFilePath;
|
||||
public string PackageHashFilePath;
|
||||
}
|
||||
|
||||
public static class EditorSimulateModeHelper
|
||||
{
|
||||
private static System.Type _classType;
|
||||
|
@ -50,12 +43,12 @@ namespace YooAsset
|
|||
{
|
||||
public static class EditorSimulateModeHelper
|
||||
{
|
||||
public static string SimulateBuild(string buildPipelineName, string packageName)
|
||||
public static SimulateBuildResult SimulateBuild(string buildPipelineName, string packageName)
|
||||
{
|
||||
throw new System.Exception("Only support in unity editor !");
|
||||
}
|
||||
|
||||
public static string SimulateBuild(EDefaultBuildPipeline buildPipeline, string packageName)
|
||||
public static SimulateBuildResult SimulateBuild(EDefaultBuildPipeline buildPipeline, string packageName)
|
||||
{
|
||||
throw new System.Exception("Only support in unity editor !");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue