Talstra

Talstra

Shifting Focus...

Array

Batch Scripts 

Check Unity And Download Version

Estimated reading: 1 minute 112 views Contributors
@echo off
setlocal

REM Check if Unity 2022.2.18 is already installed
if not exist “C:\Program Files\Unity\Hub\Editor\2022.3.8f1\Editor\Unity.exe” (
echo Unity 2022.2.18 is not installed. Downloading…

REM Download Unity 2022.2.18 installer using curl
curl -o "UnityInstaller.exe" "https://download.unity3d.com/download_unity/5ebc6493a86f/Windows64EditorInstaller/UnitySetup64-2022.2.18f1.exe"

REM Run the installer (modify the path as needed)
start /wait UnityInstaller.exe /S

REM Clean up the installer
del UnityInstaller.exe
) else (
echo Unity 2022.2.18 is already installed.
)

REM Uninstall Unity Hub
“C:\Program Files\Unity Hub\Uninstall Unity Hub.exe” /S

REM Create MyUnityProject folder
mkdir “%USERPROFILE%\Documents\MyUnityProject”

REM Run Unity Editor
“C:\Program Files\Unity\Hub\Editor\2022.3.8f1\Editor\Unity.exe”

endlocal
Share this Doc

Check Unity And Download Version

Or copy link

CONTENTS
Chat Icon Close Icon