mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-22 08:20:18 +00:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0311d976bb | ||
|
|
120c07cc2e | ||
|
|
ed5ae40cb3 | ||
|
|
5931d91b5f | ||
|
|
472a5ae97a | ||
|
|
829ea66d0e | ||
|
|
ba39291ee7 |
@@ -2,6 +2,33 @@
|
|||||||
|
|
||||||
All notable changes to this package will be documented in this file.
|
All notable changes to this package will be documented in this file.
|
||||||
|
|
||||||
|
## [1.5.1] - 2023-07-12
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- 修复了太空战机DEMO在生成内置文件清单的时候,目录不存在引发的异常。
|
||||||
|
- 修复了在销毁Package时,如果存在正在加载的bundle,会导致后续加载该bundle报错的问题。
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- 真机上使用错误方法加载原生文件的时候给予正确的错误提示。
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- 新增了HostPlayModeParameters.RemoteServices字段
|
||||||
|
|
||||||
|
```c#
|
||||||
|
/// <summary>
|
||||||
|
/// 远端资源地址查询服务类
|
||||||
|
/// </summary>
|
||||||
|
public IRemoteServices RemoteServices = null;
|
||||||
|
```
|
||||||
|
|
||||||
|
### Removed
|
||||||
|
|
||||||
|
- 移除了HostPlayModeParameters.DefaultHostServer字段
|
||||||
|
- 移除了HostPlayModeParameters.FallbackHostServer字段
|
||||||
|
|
||||||
## [1.5.0] - 2023-07-05
|
## [1.5.0] - 2023-07-05
|
||||||
|
|
||||||
该版本重构了Persistent类,导致沙盒目录和内置目录的存储结构发生了变化。
|
该版本重构了Persistent类,导致沙盒目录和内置目录的存储结构发生了变化。
|
||||||
|
|||||||
@@ -79,30 +79,6 @@ namespace YooAsset
|
|||||||
_isUnloadSafe = true;
|
_isUnloadSafe = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 销毁
|
|
||||||
/// </summary>
|
|
||||||
public void DestroyAll()
|
|
||||||
{
|
|
||||||
foreach (var provider in _providerList)
|
|
||||||
{
|
|
||||||
provider.Destroy();
|
|
||||||
}
|
|
||||||
_providerList.Clear();
|
|
||||||
_providerDic.Clear();
|
|
||||||
|
|
||||||
foreach (var loader in _loaderList)
|
|
||||||
{
|
|
||||||
loader.Destroy(true);
|
|
||||||
}
|
|
||||||
_loaderList.Clear();
|
|
||||||
_loaderDic.Clear();
|
|
||||||
|
|
||||||
ClearSceneHandle();
|
|
||||||
DecryptionServices = null;
|
|
||||||
BundleServices = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 资源回收(卸载引用计数为零的资源)
|
/// 资源回收(卸载引用计数为零的资源)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -149,10 +125,12 @@ namespace YooAsset
|
|||||||
{
|
{
|
||||||
foreach (var provider in _providerList)
|
foreach (var provider in _providerList)
|
||||||
{
|
{
|
||||||
|
provider.WaitForAsyncComplete();
|
||||||
provider.Destroy();
|
provider.Destroy();
|
||||||
}
|
}
|
||||||
foreach (var loader in _loaderList)
|
foreach (var loader in _loaderList)
|
||||||
{
|
{
|
||||||
|
loader.WaitForAsyncComplete();
|
||||||
loader.Destroy(true);
|
loader.Destroy(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -73,9 +73,7 @@ namespace YooAsset
|
|||||||
if (IsValidWithWarning == false)
|
if (IsValidWithWarning == false)
|
||||||
return null;
|
return null;
|
||||||
string filePath = Provider.RawFilePath;
|
string filePath = Provider.RawFilePath;
|
||||||
if (File.Exists(filePath) == false)
|
return FileUtility.ReadAllBytes(filePath);
|
||||||
return null;
|
|
||||||
return File.ReadAllBytes(filePath);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -53,6 +53,12 @@ namespace YooAsset
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (OwnerBundle.CacheBundle == null)
|
||||||
|
{
|
||||||
|
ProcessCacheBundleException();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Status = EStatus.Loading;
|
Status = EStatus.Loading;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -55,12 +55,7 @@ namespace YooAsset
|
|||||||
|
|
||||||
if (OwnerBundle.CacheBundle == null)
|
if (OwnerBundle.CacheBundle == null)
|
||||||
{
|
{
|
||||||
if (OwnerBundle.IsDestroyed)
|
ProcessCacheBundleException();
|
||||||
throw new System.Exception("Should never get here !");
|
|
||||||
Status = EStatus.Failed;
|
|
||||||
LastError = $"The bundle {OwnerBundle.MainBundleInfo.Bundle.BundleName} has been destroyed by unity bugs !";
|
|
||||||
YooLogger.Error(LastError);
|
|
||||||
InvokeCompletion();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -53,6 +53,12 @@ namespace YooAsset
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (OwnerBundle.CacheBundle == null)
|
||||||
|
{
|
||||||
|
ProcessCacheBundleException();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Status = EStatus.Loading;
|
Status = EStatus.Loading;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -220,6 +220,30 @@ namespace YooAsset
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 处理特殊异常
|
||||||
|
/// </summary>
|
||||||
|
protected void ProcessCacheBundleException()
|
||||||
|
{
|
||||||
|
if (OwnerBundle.IsDestroyed)
|
||||||
|
throw new System.Exception("Should never get here !");
|
||||||
|
|
||||||
|
if (OwnerBundle.MainBundleInfo.Bundle.IsRawFile)
|
||||||
|
{
|
||||||
|
Status = EStatus.Failed;
|
||||||
|
LastError = $"Cannot load asset bundle file using {nameof(ResourcePackage.LoadRawFileAsync)} method !";
|
||||||
|
YooLogger.Error(LastError);
|
||||||
|
InvokeCompletion();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Status = EStatus.Failed;
|
||||||
|
LastError = $"The bundle {OwnerBundle.MainBundleInfo.Bundle.BundleName} has been destroyed by unity bugs !";
|
||||||
|
YooLogger.Error(LastError);
|
||||||
|
InvokeCompletion();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 异步操作任务
|
/// 异步操作任务
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -80,19 +80,14 @@ namespace YooAsset
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class HostPlayModeParameters : InitializeParameters
|
public class HostPlayModeParameters : InitializeParameters
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// 默认的资源服务器下载地址
|
|
||||||
/// </summary>
|
|
||||||
public string DefaultHostServer = string.Empty;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 备用的资源服务器下载地址
|
|
||||||
/// </summary>
|
|
||||||
public string FallbackHostServer = string.Empty;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 内置资源查询服务接口
|
/// 内置资源查询服务接口
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IQueryServices QueryServices = null;
|
public IQueryServices QueryServices = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 远端资源地址查询服务类
|
||||||
|
/// </summary>
|
||||||
|
public IRemoteServices RemoteServices = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -169,7 +169,7 @@ namespace YooAsset
|
|||||||
{
|
{
|
||||||
if (_downloadManifestOp == null)
|
if (_downloadManifestOp == null)
|
||||||
{
|
{
|
||||||
_downloadManifestOp = new DownloadManifestOperation(_impl, _packageName, _packageVersion, _timeout);
|
_downloadManifestOp = new DownloadManifestOperation(_impl.RemoteServices, _packageName, _packageVersion, _timeout);
|
||||||
OperationSystem.StartOperation(_downloadManifestOp);
|
OperationSystem.StartOperation(_downloadManifestOp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ namespace YooAsset
|
|||||||
{
|
{
|
||||||
if (_downloadManifestOp == null)
|
if (_downloadManifestOp == null)
|
||||||
{
|
{
|
||||||
_downloadManifestOp = new DownloadManifestOperation(_impl, _packageName, _packageVersion, _timeout);
|
_downloadManifestOp = new DownloadManifestOperation(_impl.RemoteServices, _packageName, _packageVersion, _timeout);
|
||||||
OperationSystem.StartOperation(_downloadManifestOp);
|
OperationSystem.StartOperation(_downloadManifestOp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ namespace YooAsset
|
|||||||
{
|
{
|
||||||
if (_queryRemotePackageVersionOp == null)
|
if (_queryRemotePackageVersionOp == null)
|
||||||
{
|
{
|
||||||
_queryRemotePackageVersionOp = new QueryRemotePackageVersionOperation(_impl, _packageName, _appendTimeTicks, _timeout);
|
_queryRemotePackageVersionOp = new QueryRemotePackageVersionOperation(_impl.RemoteServices, _packageName, _appendTimeTicks, _timeout);
|
||||||
OperationSystem.StartOperation(_queryRemotePackageVersionOp);
|
OperationSystem.StartOperation(_queryRemotePackageVersionOp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,25 +4,28 @@ using System.Collections.Generic;
|
|||||||
|
|
||||||
namespace YooAsset
|
namespace YooAsset
|
||||||
{
|
{
|
||||||
internal class HostPlayModeImpl : IPlayModeServices, IBundleServices, IRemoteServices
|
internal class HostPlayModeImpl : IPlayModeServices, IBundleServices
|
||||||
{
|
{
|
||||||
private PackageManifest _activeManifest;
|
private PackageManifest _activeManifest;
|
||||||
|
|
||||||
// 参数相关
|
// 参数相关
|
||||||
private string _packageName;
|
private string _packageName;
|
||||||
private string _defaultHostServer;
|
|
||||||
private string _fallbackHostServer;
|
|
||||||
private IQueryServices _queryServices;
|
private IQueryServices _queryServices;
|
||||||
|
private IRemoteServices _remoteServices;
|
||||||
|
|
||||||
|
public IRemoteServices RemoteServices
|
||||||
|
{
|
||||||
|
get { return _remoteServices; }
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 异步初始化
|
/// 异步初始化
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public InitializationOperation InitializeAsync(string packageName, string defaultHostServer, string fallbackHostServer, IQueryServices queryServices)
|
public InitializationOperation InitializeAsync(string packageName, IQueryServices queryServices, IRemoteServices remoteServices)
|
||||||
{
|
{
|
||||||
_packageName = packageName;
|
_packageName = packageName;
|
||||||
_defaultHostServer = defaultHostServer;
|
|
||||||
_fallbackHostServer = fallbackHostServer;
|
|
||||||
_queryServices = queryServices;
|
_queryServices = queryServices;
|
||||||
|
_remoteServices = remoteServices;
|
||||||
|
|
||||||
var operation = new HostPlayModeInitializationOperation(this, packageName);
|
var operation = new HostPlayModeInitializationOperation(this, packageName);
|
||||||
OperationSystem.StartOperation(operation);
|
OperationSystem.StartOperation(operation);
|
||||||
@@ -42,23 +45,12 @@ namespace YooAsset
|
|||||||
}
|
}
|
||||||
private BundleInfo ConvertToDownloadInfo(PackageBundle packageBundle)
|
private BundleInfo ConvertToDownloadInfo(PackageBundle packageBundle)
|
||||||
{
|
{
|
||||||
string remoteMainURL = GetRemoteMainURL(packageBundle.FileName);
|
string remoteMainURL = _remoteServices.GetRemoteMainURL(packageBundle.FileName);
|
||||||
string remoteFallbackURL = GetRemoteFallbackURL(packageBundle.FileName);
|
string remoteFallbackURL = _remoteServices.GetRemoteFallbackURL(packageBundle.FileName);
|
||||||
BundleInfo bundleInfo = new BundleInfo(packageBundle, BundleInfo.ELoadMode.LoadFromRemote, remoteMainURL, remoteFallbackURL);
|
BundleInfo bundleInfo = new BundleInfo(packageBundle, BundleInfo.ELoadMode.LoadFromRemote, remoteMainURL, remoteFallbackURL);
|
||||||
return bundleInfo;
|
return bundleInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region IRemoteServices接口
|
|
||||||
public string GetRemoteMainURL(string fileName)
|
|
||||||
{
|
|
||||||
return $"{_defaultHostServer}/{fileName}";
|
|
||||||
}
|
|
||||||
public string GetRemoteFallbackURL(string fileName)
|
|
||||||
{
|
|
||||||
return $"{_fallbackHostServer}/{fileName}";
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IPlayModeServices接口
|
#region IPlayModeServices接口
|
||||||
public PackageManifest ActiveManifest
|
public PackageManifest ActiveManifest
|
||||||
{
|
{
|
||||||
@@ -76,7 +68,7 @@ namespace YooAsset
|
|||||||
if (_activeManifest != null)
|
if (_activeManifest != null)
|
||||||
{
|
{
|
||||||
PersistentTools.GetPersistent(_packageName).SaveSandboxPackageVersionFile(_activeManifest.PackageVersion);
|
PersistentTools.GetPersistent(_packageName).SaveSandboxPackageVersionFile(_activeManifest.PackageVersion);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool IsBuildinPackageBundle(PackageBundle packageBundle)
|
private bool IsBuildinPackageBundle(PackageBundle packageBundle)
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ namespace YooAsset
|
|||||||
|
|
||||||
if (_assetSystemImpl != null)
|
if (_assetSystemImpl != null)
|
||||||
{
|
{
|
||||||
_assetSystemImpl.DestroyAll();
|
_assetSystemImpl.ForceUnloadAllAssets();
|
||||||
_assetSystemImpl = null;
|
_assetSystemImpl = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -122,9 +122,8 @@ namespace YooAsset
|
|||||||
var initializeParameters = parameters as HostPlayModeParameters;
|
var initializeParameters = parameters as HostPlayModeParameters;
|
||||||
initializeOperation = hostPlayModeImpl.InitializeAsync(
|
initializeOperation = hostPlayModeImpl.InitializeAsync(
|
||||||
PackageName,
|
PackageName,
|
||||||
initializeParameters.DefaultHostServer,
|
initializeParameters.QueryServices,
|
||||||
initializeParameters.FallbackHostServer,
|
initializeParameters.RemoteServices
|
||||||
initializeParameters.QueryServices
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -172,12 +171,10 @@ namespace YooAsset
|
|||||||
if (parameters is HostPlayModeParameters)
|
if (parameters is HostPlayModeParameters)
|
||||||
{
|
{
|
||||||
var hostPlayModeParameters = parameters as HostPlayModeParameters;
|
var hostPlayModeParameters = parameters as HostPlayModeParameters;
|
||||||
if (string.IsNullOrEmpty(hostPlayModeParameters.DefaultHostServer))
|
|
||||||
throw new Exception($"${hostPlayModeParameters.DefaultHostServer} is null or empty.");
|
|
||||||
if (string.IsNullOrEmpty(hostPlayModeParameters.FallbackHostServer))
|
|
||||||
throw new Exception($"${hostPlayModeParameters.FallbackHostServer} is null or empty.");
|
|
||||||
if (hostPlayModeParameters.QueryServices == null)
|
if (hostPlayModeParameters.QueryServices == null)
|
||||||
throw new Exception($"{nameof(IQueryServices)} is null.");
|
throw new Exception($"{nameof(IQueryServices)} is null.");
|
||||||
|
if (hostPlayModeParameters.RemoteServices == null)
|
||||||
|
throw new Exception($"{nameof(IRemoteServices)} is null.");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 鉴定运行模式
|
// 鉴定运行模式
|
||||||
|
|||||||
@@ -1,9 +1,18 @@
|
|||||||
|
|
||||||
namespace YooAsset
|
namespace YooAsset
|
||||||
{
|
{
|
||||||
internal interface IRemoteServices
|
public interface IRemoteServices
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取主资源站的资源地址
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="fileName">请求的文件名称</param>
|
||||||
string GetRemoteMainURL(string fileName);
|
string GetRemoteMainURL(string fileName);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取备用资源站的资源地址
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="fileName">请求的文件名称</param>
|
||||||
string GetRemoteFallbackURL(string fileName);
|
string GetRemoteFallbackURL(string fileName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -65,11 +65,12 @@ internal class FsmInitialize : IStateNode
|
|||||||
// 联机运行模式
|
// 联机运行模式
|
||||||
if (playMode == EPlayMode.HostPlayMode)
|
if (playMode == EPlayMode.HostPlayMode)
|
||||||
{
|
{
|
||||||
|
string defaultHostServer = GetHostServerURL();
|
||||||
|
string fallbackHostServer = GetHostServerURL();
|
||||||
var createParameters = new HostPlayModeParameters();
|
var createParameters = new HostPlayModeParameters();
|
||||||
createParameters.DecryptionServices = new GameDecryptionServices();
|
createParameters.DecryptionServices = new GameDecryptionServices();
|
||||||
createParameters.QueryServices = new GameQueryServices();
|
createParameters.QueryServices = new GameQueryServices();
|
||||||
createParameters.DefaultHostServer = GetHostServerURL();
|
createParameters.RemoteServices = new RemoteServices(defaultHostServer, fallbackHostServer);
|
||||||
createParameters.FallbackHostServer = GetHostServerURL();
|
|
||||||
initializationOperation = package.InitializeAsync(createParameters);
|
initializationOperation = package.InitializeAsync(createParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -115,6 +116,30 @@ internal class FsmInitialize : IStateNode
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 远端资源地址查询服务类
|
||||||
|
/// </summary>
|
||||||
|
private class RemoteServices : IRemoteServices
|
||||||
|
{
|
||||||
|
private readonly string _defaultHostServer;
|
||||||
|
private readonly string _fallbackHostServer;
|
||||||
|
|
||||||
|
public RemoteServices(string defaultHostServer, string fallbackHostServer)
|
||||||
|
{
|
||||||
|
_defaultHostServer = defaultHostServer;
|
||||||
|
_fallbackHostServer = fallbackHostServer;
|
||||||
|
}
|
||||||
|
string IRemoteServices.GetRemoteFallbackURL(string fileName)
|
||||||
|
{
|
||||||
|
return $"{_defaultHostServer}/{fileName}";
|
||||||
|
}
|
||||||
|
string IRemoteServices.GetRemoteMainURL(string fileName)
|
||||||
|
{
|
||||||
|
return $"{_fallbackHostServer}/{fileName}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 资源文件解密服务类
|
/// 资源文件解密服务类
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -51,9 +51,12 @@ public sealed class StreamingAssetsHelper
|
|||||||
{
|
{
|
||||||
_isInit = true;
|
_isInit = true;
|
||||||
var manifest = Resources.Load<BuildinFileManifest>("BuildinFileManifest");
|
var manifest = Resources.Load<BuildinFileManifest>("BuildinFileManifest");
|
||||||
foreach (string fileName in manifest.BuildinFiles)
|
if (manifest != null)
|
||||||
{
|
{
|
||||||
_cacheData.Add(fileName);
|
foreach (string fileName in manifest.BuildinFiles)
|
||||||
|
{
|
||||||
|
_cacheData.Add(fileName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -81,10 +84,19 @@ internal class PreprocessBuild : UnityEditor.Build.IPreprocessBuildWithReport
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public void OnPreprocessBuild(UnityEditor.Build.Reporting.BuildReport report)
|
public void OnPreprocessBuild(UnityEditor.Build.Reporting.BuildReport report)
|
||||||
{
|
{
|
||||||
var manifest = ScriptableObject.CreateInstance<BuildinFileManifest>();
|
string saveFilePath = "Assets/Resources/BuildinFileManifest.asset";
|
||||||
|
if (File.Exists(saveFilePath))
|
||||||
|
File.Delete(saveFilePath);
|
||||||
|
|
||||||
string folderPath = $"{Application.dataPath}/StreamingAssets/{StreamingAssetsDefine.RootFolderName}";
|
string folderPath = $"{Application.dataPath}/StreamingAssets/{StreamingAssetsDefine.RootFolderName}";
|
||||||
DirectoryInfo root = new DirectoryInfo(folderPath);
|
DirectoryInfo root = new DirectoryInfo(folderPath);
|
||||||
|
if (root.Exists == false)
|
||||||
|
{
|
||||||
|
Debug.Log($"没有发现YooAsset内置目录 : {folderPath}");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var manifest = ScriptableObject.CreateInstance<BuildinFileManifest>();
|
||||||
FileInfo[] files = root.GetFiles("*", SearchOption.AllDirectories);
|
FileInfo[] files = root.GetFiles("*", SearchOption.AllDirectories);
|
||||||
foreach (var fileInfo in files)
|
foreach (var fileInfo in files)
|
||||||
{
|
{
|
||||||
@@ -95,9 +107,6 @@ internal class PreprocessBuild : UnityEditor.Build.IPreprocessBuildWithReport
|
|||||||
manifest.BuildinFiles.Add(fileInfo.Name);
|
manifest.BuildinFiles.Add(fileInfo.Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
string saveFilePath = "Assets/Resources/BuildinFileManifest.asset";
|
|
||||||
if (File.Exists(saveFilePath))
|
|
||||||
File.Delete(saveFilePath);
|
|
||||||
if (Directory.Exists("Assets/Resources") == false)
|
if (Directory.Exists("Assets/Resources") == false)
|
||||||
Directory.CreateDirectory("Assets/Resources");
|
Directory.CreateDirectory("Assets/Resources");
|
||||||
UnityEditor.AssetDatabase.CreateAsset(manifest, saveFilePath);
|
UnityEditor.AssetDatabase.CreateAsset(manifest, saveFilePath);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "com.tuyoogame.yooasset",
|
"name": "com.tuyoogame.yooasset",
|
||||||
"displayName": "YooAsset",
|
"displayName": "YooAsset",
|
||||||
"version": "1.5.0",
|
"version": "1.5.1",
|
||||||
"unity": "2019.4",
|
"unity": "2019.4",
|
||||||
"description": "unity3d resources management system.",
|
"description": "unity3d resources management system.",
|
||||||
"author": {
|
"author": {
|
||||||
|
|||||||
Reference in New Issue
Block a user