| | |
| | | System.IO.Directory.CreateDirectory(yooRoot); |
| | | } |
| | | |
| | | public static void DeleteStartupConfigsFromStreamingAssets() |
| | | { |
| | | string yooRoot = AssetBundleBuilderHelper.GetStreamingAssetsRoot(); |
| | | string initialFunctionPath = System.IO.Path.Combine(yooRoot, "InitialFunction.txt"); |
| | | string initialFunctionMetaPath = initialFunctionPath + ".meta"; |
| | | string configDir = System.IO.Path.Combine(yooRoot, "config"); |
| | | string configMetaPath = configDir + ".meta"; |
| | | |
| | | if (System.IO.File.Exists(initialFunctionPath)) |
| | | { |
| | | System.IO.File.Delete(initialFunctionPath); |
| | | } |
| | | |
| | | if (System.IO.File.Exists(initialFunctionMetaPath)) |
| | | { |
| | | System.IO.File.Delete(initialFunctionMetaPath); |
| | | } |
| | | |
| | | if (System.IO.Directory.Exists(configDir)) |
| | | { |
| | | System.IO.Directory.Delete(configDir, true); |
| | | } |
| | | |
| | | if (System.IO.File.Exists(configMetaPath)) |
| | | { |
| | | System.IO.File.Delete(configMetaPath); |
| | | } |
| | | |
| | | AssetDatabase.Refresh(); |
| | | Debug.Log("[YooAssetBuildTool] 已清理 StreamingAssets/yoo 下的 InitialFunction.txt 和 config 目录"); |
| | | } |
| | | |
| | | private static string ResolveOutputDirectory(string outputPath) |
| | | { |
| | | string projectRoot = System.IO.Directory.GetParent(Application.dataPath).FullName; |