From f804e8405ed8d17e9189f4bd66cae8ff2ad1d15c Mon Sep 17 00:00:00 2001 From: hevinci Date: Mon, 25 Sep 2023 18:40:02 +0800 Subject: [PATCH] update settings --- .../AssetBundleBuilder/AssetBundleBuilderHelper.cs | 2 +- .../YooAsset/Runtime/CacheSystem/PersistentManager.cs | 8 ++++---- Assets/YooAsset/Runtime/Settings/YooAssetSettings.cs | 10 +++++----- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilderHelper.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilderHelper.cs index 050b937..a366f42 100644 --- a/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilderHelper.cs +++ b/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilderHelper.cs @@ -22,7 +22,7 @@ namespace YooAsset.Editor /// public static string GetStreamingAssetsRoot() { - return $"{Application.dataPath}/StreamingAssets/{YooAssetSettings.DefaultYooFolderName}/"; + return $"{Application.dataPath}/StreamingAssets/{YooAssetSettingsData.Setting.DefaultYooFolderName}/"; } } } \ No newline at end of file diff --git a/Assets/YooAsset/Runtime/CacheSystem/PersistentManager.cs b/Assets/YooAsset/Runtime/CacheSystem/PersistentManager.cs index 1e7467b..bc9468a 100644 --- a/Assets/YooAsset/Runtime/CacheSystem/PersistentManager.cs +++ b/Assets/YooAsset/Runtime/CacheSystem/PersistentManager.cs @@ -58,7 +58,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() { @@ -66,11 +66,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 } diff --git a/Assets/YooAsset/Runtime/Settings/YooAssetSettings.cs b/Assets/YooAsset/Runtime/Settings/YooAssetSettings.cs index a0d87bd..b2e7d00 100644 --- a/Assets/YooAsset/Runtime/Settings/YooAssetSettings.cs +++ b/Assets/YooAsset/Runtime/Settings/YooAssetSettings.cs @@ -10,6 +10,11 @@ namespace YooAsset /// public string ManifestFileName = "PackageManifest"; + /// + /// 默认的YooAsset文件夹名称 + /// + public string DefaultYooFolderName = "yoo"; + /// /// 清单文件头标记 @@ -37,11 +42,6 @@ namespace YooAsset /// public const string CacheBundleInfoFileName = "__info"; - /// - /// 默认的YooAsset文件夹名称 - /// - public const string DefaultYooFolderName = "yoo"; - /// /// 缓存的资源文件的文件夹名称 ///