update asset settings

可以自定义设置参数DefaultYooFolderName
pull/186/head^2
hevinci 2023-09-25 18:25:34 +08:00
parent 54d89d957a
commit 30854e4b93
3 changed files with 9 additions and 10 deletions

View File

@ -22,7 +22,7 @@ namespace YooAsset.Editor
/// </summary>
public static string GetDefaultStreamingAssetsRoot()
{
return $"{Application.dataPath}/StreamingAssets/{YooAssetSettings.DefaultYooFolderName}/";
return $"{Application.dataPath}/StreamingAssets/{YooAssetSettingsData.Setting.DefaultYooFolderName}/";
}
}
}

View File

@ -46,7 +46,7 @@ namespace YooAsset
}
private static string CreateDefaultBuildinRoot()
{
return PathUtility.Combine(UnityEngine.Application.streamingAssetsPath, YooAssetSettings.DefaultYooFolderName);
return PathUtility.Combine(UnityEngine.Application.streamingAssetsPath, YooAssetSettingsData.Setting.DefaultYooFolderName);
}
private static string CreateDefaultSandboxRoot()
{
@ -54,11 +54,11 @@ namespace YooAsset
// 注意:为了方便调试查看,编辑器下把存储目录放到项目里。
string projectPath = Path.GetDirectoryName(UnityEngine.Application.dataPath);
projectPath = PathUtility.RegularPath(projectPath);
return PathUtility.Combine(projectPath, YooAssetSettings.DefaultYooFolderName);
return PathUtility.Combine(projectPath, YooAssetSettingsData.Setting.DefaultYooFolderName);
#elif UNITY_STANDALONE
return PathUtility.Combine(UnityEngine.Application.dataPath, YooAssetSettings.DefaultYooFolderName);
return PathUtility.Combine(UnityEngine.Application.dataPath, YooAssetSettingsData.Setting.DefaultYooFolderName);
#else
return PathUtility.Combine(UnityEngine.Application.persistentDataPath, YooAssetSettings.DefaultYooFolderName);
return PathUtility.Combine(UnityEngine.Application.persistentDataPath, YooAssetSettingsData.Setting.DefaultYooFolderName);
#endif
}

View File

@ -10,6 +10,10 @@ namespace YooAsset
/// </summary>
public string ManifestFileName = "PackageManifest";
/// <summary>
/// 默认的YooAsset文件夹名称
/// </summary>
public string DefaultYooFolderName = "yoo";
/// <summary>
/// 清单文件头标记
@ -37,11 +41,6 @@ namespace YooAsset
/// </summary>
public const string CacheBundleInfoFileName = "__info";
/// <summary>
/// 默认的YooAsset文件夹名称
/// </summary>
public const string DefaultYooFolderName = "yoo";
/// <summary>
/// 缓存的资源文件的文件夹名称
/// </summary>