public static void SymbolLinkResource() { KSymbolLinkHelper.DeleteAllLinks(AssetBundlesLinkPath); var exportPath = GetResourceExportPath(); var linkPath = GetABLinkPath(); KSymbolLinkHelper.SymbolLinkFolder(exportPath, linkPath); //NOTE 特别无解,无法同步link这两个目录,使用协程处理后目录内容是空,如果2018及以下版本无EditorCoroutine使用脚本进行link /*Log.Info("Add Symbol Link Assetbundle."); * ins = new object(); * EditorCoroutineUtility.StartCoroutine(LinkLua(), ins); * Log.Info("Add Symbol Link Lua."); * EditorCoroutineUtility.StartCoroutine(LinkSettings(), ins); * Log.Info("Add Symbol Link Settings.");*/ var linkFile = Application.dataPath + "/../AssetLink.sh"; if (System.Environment.OSVersion.ToString().Contains("Windows")) { linkFile = Application.dataPath + "/../AssetLink.bat"; } KTool.ExecuteFile(linkFile); var dstPath = Application.streamingAssetsPath + "/" + AppConfig.VersionTxtName; if (File.Exists(dstPath)) { File.Delete(dstPath); } File.Copy(AppConfig.VersionTextPath, dstPath); Log.Info($"拷贝version.txt完成,File.Exists:{File.Exists(dstPath)}"); AssetDatabase.Refresh(); }