|
unity离线文档打开慢是因为本地文档会访问谷歌的服务器, 将所有html文件里的相关代码删除即可- using System;
- using System.IO;
- using System.Text;
- namespace Tool
- {
- class Program
- {
- static void Main(string[] args)
- {
- var rootFilePath = "C:/Users/****/Desktop/UnityDocumentation";
- foreach (var htmlFilePath in Directory.EnumerateFiles(rootFilePath, "*.html", SearchOption.AllDirectories))
- {
- var htmlText = File.ReadAllText(htmlFilePath);
- var newHtmlText = htmlText.Replace(
- &#34;</script><link href=\&#34;https://fonts.googleapis.com/css?family=Roboto&amp;display=swap\&#34; rel=\&#34;stylesheet\&#34;>&#34;, &#34;&#34;);
- File.WriteAllText(htmlFilePath, newHtmlText, Encoding.UTF8);
- }
- }
- }
- }
复制代码 |
|