mirror of https://github.com/tuyoogame/YooAsset
parent
9a2ed64b4e
commit
1e88bad73e
|
@ -16,12 +16,20 @@ namespace YooAsset
|
||||||
private static string _sandboxPath;
|
private static string _sandboxPath;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重写内置跟路径
|
||||||
|
/// </summary>
|
||||||
|
public static void OverwriteBuildinPath(string path)
|
||||||
|
{
|
||||||
|
_buildinPath = path;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 重写沙盒跟路径
|
/// 重写沙盒跟路径
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static void OverwriteSandboxPath(string sandboxPath)
|
public static void OverwriteSandboxPath(string path)
|
||||||
{
|
{
|
||||||
_sandboxPath = sandboxPath;
|
_sandboxPath = path;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -253,6 +253,27 @@ namespace YooAsset
|
||||||
CacheSystem.InitVerifyLevel = verifyLevel;
|
CacheSystem.InitVerifyLevel = verifyLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设置缓存系统参数,沙盒目录的存储路径
|
||||||
|
/// </summary>
|
||||||
|
public static void SetCacheSystemBuildinPath(string buildinPath)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(buildinPath))
|
||||||
|
{
|
||||||
|
YooLogger.Error($"Buildin path is null or empty !");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 注意:需要确保没有任何资源系统起效之前才可以设置!
|
||||||
|
if (_packages.Count > 0)
|
||||||
|
{
|
||||||
|
YooLogger.Error($"Please call this method {nameof(SetCacheSystemBuildinPath)} before the package is created !");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
PersistentTools.OverwriteBuildinPath(buildinPath);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设置缓存系统参数,沙盒目录的存储路径
|
/// 设置缓存系统参数,沙盒目录的存储路径
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -264,7 +285,7 @@ namespace YooAsset
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 注意:需要确保没有任何资源系统起效之前才可以设置沙盒目录!
|
// 注意:需要确保没有任何资源系统起效之前才可以设置!
|
||||||
if (_packages.Count > 0)
|
if (_packages.Count > 0)
|
||||||
{
|
{
|
||||||
YooLogger.Error($"Please call this method {nameof(SetCacheSystemSandboxPath)} before the package is created !");
|
YooLogger.Error($"Please call this method {nameof(SetCacheSystemSandboxPath)} before the package is created !");
|
||||||
|
|
Loading…
Reference in New Issue