UnityHub无法连接证书服务器各种烦的彻底解决方案

引用:https://blog.csdn.net/MR_ls2/article/details/105072754


<div class="markdown_views prism-atom-one-dark" id="content_views">
                    <!-- flowchart 箭头图标 勿删 -->
                    <svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
                        <path id="raphael-marker-block" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" stroke-linecap="round" d="M 5 0 L 0 2.5 L 5 5 Z" />
                    </svg>
                                            <h2><a name="t0"></a><a id="UnityHub_1"></a>UnityHub无法连接证书服务器各种烦的彻底解决方案</h2>
<p><strong>1:</strong><a href="https://public-cdn.cloud.unity3d.com/hub/prod/UnityHubSetup.exe" rel="nofollow">下载UnityHub</a></p>
<p><strong>2:</strong><a href="https://cdn.npm.taobao.org/dist/node/v12.16.1/node-v12.16.1-x64.msi" rel="nofollow">下载Node.js</a></p>
<p><strong>3:</strong>  Win+R(输入命令)    npm install -g asar   直到出来下图<br>
<img alt="" src="https://img-blog.csdnimg.cn/2020032414474984.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L01SX2xzMg==,size_16,color_FFFFFF,t_70"><br>
<strong>4:</strong> 下载完UnityHub默认在C盘,<br>
打开 C:\Program Files\Unity Hub\resources。单击resources,按住shift,打开Windows PowerShell。 输入asar extract .\app.asar app。<br>
<img alt="在这里插入图片描述" src="https://img-blog.csdnimg.cn/2020032414575457.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L01SX2xzMg==,size_16,color_FFFFFF,t_70"><br>
<strong>5:</strong> 如果报了下图错误<br>
<img alt="在这里插入图片描述" src="https://img-blog.csdnimg.cn/20200324145938501.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L01SX2xzMg==,size_16,color_FFFFFF,t_70"><br>
用管理员身份重新运行,输入set-ExecutionPolicy RemoteSigned<br>
<img alt="在这里插入图片描述" src="https://img-blog.csdnimg.cn/20200324150554328.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L01SX2xzMg==,size_16,color_FFFFFF,t_70"><br>
<strong>6:</strong> 然后cd到UnityHub目录 ,<br>
cd C:\Program Files\Unity Hub\resources<br>
<img alt="在这里插入图片描述" src="https://img-blog.csdnimg.cn/20200324151000340.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L01SX2xzMg==,size_16,color_FFFFFF,t_70"><br>
<strong>7:</strong> 删除app.asar。<br>
<img alt="在这里插入图片描述" src="https://img-blog.csdnimg.cn/20200324153357838.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L01SX2xzMg==,size_16,color_FFFFFF,t_70"><br>
<strong>8:</strong> 替换下面的2个文件,在解压出来的app文件夹里面<br>
<strong>C:\Program Files\Unity Hub\resources\app\src\services\licenseService\licenseClient.js</strong></p>
<pre class="prettyprint"><code class="has-numbering" style="position: unset;" onclick="mdcp.copyCode(event)">getLicenseInfo(callback) {
    // load license
    // get latest data from licenseCore
    //licenseInfo.activated = licenseCore.getLicenseToken().length &gt; 0;//注释这行
    licenseInfo.activated = true;//新增这行
    licenseInfo.flow = licenseCore.getLicenseKind();
    licenseInfo.label = licenseCore.getLicenseKind(true);
    licenseInfo.offlineDisabled = licenseCore.offlineDisabled;
    licenseInfo.transactionId = licenseCore.getTransactionId();
}
<div class="hljs-button {2}" data-title="复制"></div></code><ul class="pre-numbering"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li></ul></pre>
<p><strong>C:\Program Files\Unity Hub\resources\app\src\services\licenseService\licenseCore.js</strong></p>
<pre class="prettyprint"><code class="has-numbering" style="position: unset;" onclick="mdcp.copyCode(event)">verifyLicenseData(xml, newfile = false) {
    return new Promise((resolve, reject) =&gt; {
        resolve(true);//新增这行
        if (xml === '') {
            this.licenseStatus = LICENSE_STATUS.kLicenseErrorFlag_NoLicense;
            reject();
            return;
        }
    }
}
<div class="hljs-button {2}" data-title="复制"></div></code><ul class="pre-numbering"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li></ul></pre>
<p><strong>9:</strong> 如果无法保存,可以复制到桌面改完再替换进去。</p>

                                    </div>



©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 216,496评论 6 501
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 92,407评论 3 392
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 162,632评论 0 353
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 58,180评论 1 292
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 67,198评论 6 388
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 51,165评论 1 299
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 40,052评论 3 418
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 38,910评论 0 274
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 45,324评论 1 310
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 37,542评论 2 332
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 39,711评论 1 348
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 35,424评论 5 343
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 41,017评论 3 326
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 31,668评论 0 22
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 32,823评论 1 269
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 47,722评论 2 368
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 44,611评论 2 353

推荐阅读更多精彩内容