mirror of https://github.com/tuyoogame/YooAsset
fix #491
parent
c2b33f5ec4
commit
ddda9e29db
Assets/YooAsset/Runtime/Settings
|
@ -3,10 +3,10 @@ using UnityEngine;
|
|||
|
||||
namespace YooAsset
|
||||
{
|
||||
internal static class YooAssetSettingsData
|
||||
public static class YooAssetSettingsData
|
||||
{
|
||||
private static YooAssetSettings _setting = null;
|
||||
public static YooAssetSettings Setting
|
||||
internal static YooAssetSettings Setting
|
||||
{
|
||||
get
|
||||
{
|
||||
|
@ -33,6 +33,15 @@ namespace YooAsset
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取YooAsset文件夹名称
|
||||
/// </summary>
|
||||
public static string GetDefaultYooFolderName()
|
||||
{
|
||||
return Setting.DefaultYooFolderName;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取构建报告文件名
|
||||
/// </summary>
|
||||
|
@ -92,7 +101,7 @@ namespace YooAsset
|
|||
/// <summary>
|
||||
/// 获取YOO的Resources目录的加载路径
|
||||
/// </summary>
|
||||
public static string GetYooResourcesLoadPath(string packageName, string fileName)
|
||||
internal static string GetYooResourcesLoadPath(string packageName, string fileName)
|
||||
{
|
||||
if (string.IsNullOrEmpty(Setting.DefaultYooFolderName))
|
||||
return PathUtility.Combine(packageName, fileName);
|
||||
|
@ -103,7 +112,7 @@ namespace YooAsset
|
|||
/// <summary>
|
||||
/// 获取YOO的Resources目录的全路径
|
||||
/// </summary>
|
||||
public static string GetYooResourcesFullPath()
|
||||
internal static string GetYooResourcesFullPath()
|
||||
{
|
||||
if (string.IsNullOrEmpty(Setting.DefaultYooFolderName))
|
||||
return $"Assets/Resources";
|
||||
|
@ -114,7 +123,7 @@ namespace YooAsset
|
|||
/// <summary>
|
||||
/// 获取YOO的编辑器下缓存文件根目录
|
||||
/// </summary>
|
||||
public static string GetYooEditorCacheRoot()
|
||||
internal static string GetYooEditorCacheRoot()
|
||||
{
|
||||
if (string.IsNullOrEmpty(Setting.DefaultYooFolderName))
|
||||
{
|
||||
|
@ -134,7 +143,7 @@ namespace YooAsset
|
|||
/// <summary>
|
||||
/// 获取YOO的PC平台缓存文件根目录
|
||||
/// </summary>
|
||||
public static string GetYooStandaloneWinCacheRoot()
|
||||
internal static string GetYooStandaloneWinCacheRoot()
|
||||
{
|
||||
if (string.IsNullOrEmpty(Setting.DefaultYooFolderName))
|
||||
return Application.dataPath;
|
||||
|
@ -145,18 +154,18 @@ namespace YooAsset
|
|||
/// <summary>
|
||||
/// 获取YOO的Linux平台缓存文件根目录
|
||||
/// </summary>
|
||||
public static string GetYooStandaloneLinuxCacheRoot()
|
||||
internal static string GetYooStandaloneLinuxCacheRoot()
|
||||
{
|
||||
if (string.IsNullOrEmpty(Setting.DefaultYooFolderName))
|
||||
return Application.dataPath;
|
||||
else
|
||||
return PathUtility.Combine(Application.dataPath, Setting.DefaultYooFolderName);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取YOO的Mac平台缓存文件根目录
|
||||
/// </summary>
|
||||
public static string GetYooStandaloneMacCacheRoot()
|
||||
internal static string GetYooStandaloneMacCacheRoot()
|
||||
{
|
||||
if (string.IsNullOrEmpty(Setting.DefaultYooFolderName))
|
||||
return Application.persistentDataPath;
|
||||
|
@ -167,7 +176,7 @@ namespace YooAsset
|
|||
/// <summary>
|
||||
/// 获取YOO的移动平台缓存文件根目录
|
||||
/// </summary>
|
||||
public static string GetYooMobileCacheRoot()
|
||||
internal static string GetYooMobileCacheRoot()
|
||||
{
|
||||
if (string.IsNullOrEmpty(Setting.DefaultYooFolderName))
|
||||
return Application.persistentDataPath;
|
||||
|
@ -178,7 +187,7 @@ namespace YooAsset
|
|||
/// <summary>
|
||||
/// 获取YOO默认的缓存文件根目录
|
||||
/// </summary>
|
||||
public static string GetYooDefaultCacheRoot()
|
||||
internal static string GetYooDefaultCacheRoot()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
return GetYooEditorCacheRoot();
|
||||
|
@ -196,7 +205,7 @@ namespace YooAsset
|
|||
/// <summary>
|
||||
/// 获取YOO默认的内置文件根目录
|
||||
/// </summary>
|
||||
public static string GetYooDefaultBuildinRoot()
|
||||
internal static string GetYooDefaultBuildinRoot()
|
||||
{
|
||||
if (string.IsNullOrEmpty(Setting.DefaultYooFolderName))
|
||||
return Application.streamingAssetsPath;
|
||||
|
|
Loading…
Reference in New Issue