public static void DeleteLinkStreamingAssets() { string linkPath = Application.streamingAssetsPath + "/" + Utility.GetPlatformName(); if (IsLinkStreamingAssets) { DeleteLink(linkPath); IsLinkStreamingAssets = false; } else { MyEditorTools.DeleteDir(linkPath); } }
/// <summary> /// 创建StreamingAssets链接 /// </summary> public static void MkLinkStreamingAssets() { string linkPath = Application.streamingAssetsPath + "/" + Utility.GetPlatformName(); if (IsLinkStreamingAssets) { MyEditorTools.CreateDir(Application.streamingAssetsPath); var exportPath = AppSetting.ExportResBaseDir + Utility.GetPlatformName(); MyEditorTools.DeleteDir(linkPath); //删除复制过来的文件夹 SymbolLinkFolder(exportPath, linkPath); } else { DeleteLink(linkPath); } AssetDatabase.Refresh(); }