get unity
2.0.0

เครื่องมือบรรทัดคำสั่งสำหรับรับ URL ดาวน์โหลดสำหรับ Unity เวอร์ชันล่าสุดหรือเวอร์ชันเฉพาะ
$ npm ติดตั้ง -g get-unity
$ ได้รับความสามัคคี
$ รับความสามัคคี 2019.x
$ รับความสามัคคี 2019.2.x
$ get-unity --file=ProjectSettings/ProjectVersion.txt
$ UNITY_URL=$(get-unity --file=ProjectSettings/ProjectVersion.txt)$ echo $UNITY_URL
เครื่องมือบรรทัดคำสั่งสำหรับรับ URL ดาวน์โหลดสำหรับ Unity เวอร์ชันล่าสุดหรือเวอร์ชันเฉพาะ
การใช้งาน
$ get-unity <version> [ตัวเลือก]
ตัวเลือก
--file, -f ค้นหาไฟล์สำหรับหมายเลขเวอร์ชัน Unity
--force, -r บังคับให้อัปเดตเป็นแคชในเครื่องของเวอร์ชันตัวแก้ไข
--ออฟไลน์, -o ป้องกันการร้องขอให้อัปเดตแคชในเครื่องของเวอร์ชันตัวแก้ไข
--help, -h แสดงข้อความช่วยเหลือนี้
--version, -v แสดงเวอร์ชันที่ติดตั้งปัจจุบันgetUnityUrls(string filter [, string filePath]) const { getUnityUrls } = need('get-unity');getUnityUrls('2019', './data/editor-installers.json').then(urls =>
console.log(URL));เอาท์พุท:
{ "linux": "https://download.unity3d.com/download_unity/5f859a4cfee5/LinuxEditorInstaller/Unity.tar.xz", "mac": "https://download.unity3d.com/download_unity/5f859a4cfee5/MacEditorInstaller/ ความสามัคคี-2019.2.11f1.pkg", "win64": "https://download.unity3d.com/download_unity/5f859a4cfee5/Windows64EditorInstaller/UnitySetup64-2019.2.11f1.exe"}parseVersionFromString(string contents) const { parsers } = ต้องการ ('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 } = need('get-unity');updateEditorInstallers('./data/editor-installers.json', 3600000).then(() =>
console.log('เสร็จสิ้น'));