update runtime code
1. 新增了ResourcePackage.GetPackageBuildinRootDirectory()方法 2. 新增了ResourcePackage.GetPackageSandboxRootDirectory()方法 3. 新增了ResourcePackage.ClearPackageSandbox()方法mlyDevMerge1.5.7
parent
bcd2a412a5
commit
ca89fb3c23
|
@ -79,6 +79,10 @@ namespace YooAsset
|
||||||
// 检测初始化参数合法性
|
// 检测初始化参数合法性
|
||||||
CheckInitializeParameters(parameters);
|
CheckInitializeParameters(parameters);
|
||||||
|
|
||||||
|
// 重写持久化根目录
|
||||||
|
var persistent = PersistentTools.GetOrCreatePersistent(PackageName);
|
||||||
|
persistent.OverwriteRootDirectory(parameters.BuildinRootDirectory, parameters.SandboxRootDirectory);
|
||||||
|
|
||||||
// 初始化资源系统
|
// 初始化资源系统
|
||||||
InitializationOperation initializeOperation;
|
InitializationOperation initializeOperation;
|
||||||
_assetSystemImpl = new AssetSystemImpl();
|
_assetSystemImpl = new AssetSystemImpl();
|
||||||
|
@ -291,6 +295,37 @@ namespace YooAsset
|
||||||
_assetSystemImpl.ForceUnloadAllAssets();
|
_assetSystemImpl.ForceUnloadAllAssets();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region 沙盒相关
|
||||||
|
/// <summary>
|
||||||
|
/// 获取包裹的内置文件根路径
|
||||||
|
/// </summary>
|
||||||
|
public string GetPackageBuildinRootDirectory()
|
||||||
|
{
|
||||||
|
DebugCheckInitialize();
|
||||||
|
var persistent = PersistentTools.GetPersistent(PackageName);
|
||||||
|
return persistent.BuildinRoot;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取包裹的沙盒文件根路径
|
||||||
|
/// </summary>
|
||||||
|
public string GetPackageSandboxRootDirectory()
|
||||||
|
{
|
||||||
|
DebugCheckInitialize();
|
||||||
|
var persistent = PersistentTools.GetPersistent(PackageName);
|
||||||
|
return persistent.SandboxRoot;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 清空包裹的沙盒目录
|
||||||
|
/// </summary>
|
||||||
|
public void ClearPackageSandbox()
|
||||||
|
{
|
||||||
|
DebugCheckInitialize();
|
||||||
|
var persistent = PersistentTools.GetPersistent(PackageName);
|
||||||
|
persistent.DeleteSandboxPackageFolder();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region 资源信息
|
#region 资源信息
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in New Issue