game-ci / unity-builder

Build Unity projects for different platforms
https://github.com/marketplace/actions/unity-builder
MIT License
845 stars 244 forks source link

builder@v3 can't build iOS on mac #586

Closed mikekhristo closed 10 months ago

mikekhristo commented 11 months ago

Bug description

unity-builder@v3 Target OS: iOS Runner: self hosted m1 mac mini Unity version: 2021.3.25f1

The build fails with compilation errors due to losing the targetPlatform. In the code, we have checks for UNITY_IOS and UNITY_ANDROID. Both of those are false in code. Later in the logs we see it loses the target platform.

How to reproduce

Expected behavior

UNITY_IOS should be true. Code should build as expected when running the build process manually.

Additional details

Logs: https://gist.github.com/mikekhristo/7f5259e1d4022b28cfbd352b68f14c47

Look at lines 93-95:

2023-10-18T17:34:50.0357000Z ##[group]Run game-ci/unity-builder@v3
2023-10-18T17:34:50.0357520Z with:
2023-10-18T17:34:50.0357850Z   targetPlatform: iOS

then at 253-255 it starts looking for OSXStandalone:

2023-10-18T17:34:57.4264370Z Register platform support module: /Applications/Unity/Hub/Editor/2021.3.25f1/Unity.app/Contents/PlaybackEngines/MacStandaloneSupport/UnityEditor.OSXStandalone.Extensions.dll
2023-10-18T17:34:57.4268140Z Registered in 0.001130 seconds.
2023-10-18T17:34:57.5428710Z Native extension for OSXStandalone target not found
mikekhristo commented 11 months ago

figured it out. had to log into the m1 mac mini remotely, open unity hub, install the ios and android build modules manually.