Default Yoo Folder Name 可配空
This commit is contained in:
何冠峰
2024-12-17 15:27:36 +08:00
parent 906e0e3554
commit 1f07411dde
11 changed files with 146 additions and 69 deletions

View File

@@ -255,7 +255,7 @@ namespace YooAsset
PackageName = packageName;
if (string.IsNullOrEmpty(rootDirectory))
rootDirectory = CacheHelper.GetDefaultCacheRoot();
rootDirectory = GetDefaultCacheRoot();
_packageRoot = PathUtility.Combine(rootDirectory, packageName);
_cacheFileRoot = PathUtility.Combine(_packageRoot, DefaultCacheFileSystemDefine.SaveFilesFolderName);
@@ -520,6 +520,16 @@ namespace YooAsset
#endregion
#region
public string GetDefaultCacheRoot()
{
#if UNITY_EDITOR
return YooAssetSettingsData.GetYooEditorCacheRoot();
#elif UNITY_STANDALONE
return YooAssetSettingsData.GetYooStandaloneCacheRoot();
#else
return YooAssetSettingsData.GetYooMobileCacheRoot();
#endif
}
public string GetCacheFileLoadPath(PackageBundle bundle)
{
return GetDataFilePath(bundle);