接入SoftMaskForUGUI
SoftMaskForUGUI插件地址
https://github.com/mob-sakai/SoftMaskForUGUI/tree/main
在 manifest.json 配置如下:
"com.coffee.softmask-for-ugui": "https://github.com/mob-sakai/SoftMaskForUGUI.git#1.0.0"
結果出現了下面的錯誤
An error occurred while resolving packages:
Project has invalid dependencies:
com.coffee.softmask-for-ugui: Error when executing git command. fatal: unable to connect to github.com:
github.com[0: 20.205.243.166]: errno=No error
unity package manager 無法連到github
unity package manager 不使用IE代理配置, 必須要設定 http_proxy
開啟vpn自動配置系統代理, 從 vpn 可以看到 http 監聽端口為 socket port + 1
開啟後去代理設定裡面查看, 果然是 10809(10808+1)
接著參考 unity 說明添加系統配置
http_proxy : http://127.0.0.1:10809
https_proxy : http://127.0.0.1:10809
https://docs.unity3d.com/cn/2019.3/Manual/upm-network.html
接著把 unity 關閉後並且重啟 unity hub 開啟專案
發現還是錯的回頭去看 manifest.json, 把 https 改成 http, https 必須要有證書, 所以改成 http 試試看
package manager 重刷後發現成功了, 從 vpn log 也察看到對應的請求
http://github.com/mob-sakai/SoftMaskForUGUI.git/info/refs?service=git-upload-pack [http -> proxy]
接著就是把 demo 給匯入