Closed camnewnham closed 1 year ago
I've worked around this by using powershell based on the js code from this repo
- name: Install Unity
id: install_unity
run: |
$match = [regex]::match((Get-Content -Path ProjectSettings\ProjectVersion.txt | Out-String), 'm_EditorVersionWithRevision: (?<version>[^\s]+) \((?<changeset>[^\)]+)\)')
$unityVersion = $match.groups["version"].Value
$unityChangeset = $match.groups["changeset"].Value
curl --output installer.exe "https://public-cdn.cloud.unity3d.com/hub/prod/UnityHubSetup.exe"
Invoke-Expression "& '.\installer.exe' /S | Out-Default"
Invoke-Expression "& 'C:/Program Files/Unity Hub/Unity Hub.exe' -- --headless install --version $unityVersion --changeset $unityChangeset | Out-Default"
Invoke-Expression "& 'C:/Program Files/Unity Hub/Unity Hub.exe' -- --headless install-modules --version $unityVersion --module $env:UNITY_MODULES --childModules | Out-Default"
echo "UNITY_PATH=$("C:\Program Files\Unity\Hub\Editor\$unityVersion\Editor\Unity.exe")" >> $env:GITHUB_ENV
Hi, thanks for making this action public. It's very helpful.
After using the action
kuler90/setup-unity@v1
withAndroid
on awindows-latest
(windows-2022
) image on github actions I get the following in the Unity build log (and the build fails):The
setup-unity
log looks normal:Some discussions here that mention this was an issue (on ubuntu however...) in an older hub version when installing headless: https://github.com/game-ci/unity-builder/issues/489