get unity
2.0.0

Unity の最新バージョンまたは特定のバージョンのダウンロード URL を取得するためのコマンド ライン ツール。
$ npm install -g get-unity
$ 取得ユニティ
$ get-unity 2019.x
$ get-unity 2019.2.x
$ get-unity --file=プロジェクト設定/プロジェクトバージョン.txt
$ UNITY_URL=$(get-unity --file=ProjectSettings/ProjectVersion.txt)$ echo $UNITY_URL
Unity の最新バージョンまたは特定のバージョンのダウンロード URL を取得するためのコマンド ライン ツール。
使用法
$ get-unity <バージョン> [オプション]
オプション
--file、-f Unity のバージョン番号をファイルで検索します。
--force、-r エディタのバージョンのローカル キャッシュを強制的に更新します。
--offline、-o エディターのバージョンのローカル キャッシュを更新する要求を禁止します。
--help、-h このヘルプ メッセージを表示します。
--version、-v 現在インストールされているバージョンを表示します。getUnityUrls(string filter [, string filePath]) const { getUnityUrls } = require('get-unity');getUnityUrls('2019', './data/editor-installers.json').then(urls =>
console.log(urls));出力:
{ "linux": "https://download.unity3d.com/download_unity/5f859a4cfee5/LinuxEditorInstaller/Unity.tar.xz"、"mac": "https://download.unity3d.com/download_unity/5f859a4cfee5/MacEditorInstaller/ Unity-2019.2.11f1.pkg」、「win64」: "https://download.unity3d.com/download_unity/5f859a4cfee5/Windows64EditorInstaller/UnitySetup64-2019.2.11f1.exe"}parseVersionFromString(string contents) const { パーサー } = require('get-unity');console.log(
parsers.parseVersionFromString(`m_EditorVersion: 2019.2.9f1m_EditorVersionWithRevision: 2019.2.9f1 (ebce4d76e6e8)`));出力:
2019.2.9f1
updateEditorInstallers([string filePath, int ttl]) const { updateEditorInstallers } = require('get-unity');updateEditorInstallers('./data/editor-installers.json', 3600000).then(() =>
console.log('完了'));