Closed edqx closed 11 months ago
You can only build IL2CPP for that platform that you're on.
On windows, licensing works differently. If you pass the documented parameters correctly, you should be able to build a Windows IL2CPP build.
Sound like there's just a small misconfiguration issue that occurred because you switched to a Windows runner and Windows activation works differently. Recommend testing that your variables are indeed passed into the workflow step. If nothing else works, please consult our troubleshooting section.
So I should run the manual activation step with a windows runner?
You can only build IL2CPP for that platform that you're on.
From that I gather that the example given here in the docs can't actually work at all.
@MrGadget1024 That example works only if you are using Mono backend for the desktop platforms.
@MrGadget1024 That example works only if you are using Mono backend for the desktop platforms.
How would I specify to use Mono instead of IL2CPP? I couldn't find that option in unity-builder. The project in Unity is set to Mono.
Scripting backend can be set as shown in the Unity docs: https://docs.unity3d.com/Manual/Mono.html
Scripting backend can be set as shown in the Unity docs: https://docs.unity3d.com/Manual/Mono.html
As I said - it's already set to that in Unity, but I got the same error as the OP about IL2CPP not installed.
Scripting backend can be set as shown in the Unity docs: https://docs.unity3d.com/Manual/Mono.html
Which project file is unity-builder looking in and what's it looking for to determine which scripting backend to use?
Which project file is unity-builder looking in and what's it looking for to determine which scripting backend to use?
Unity should automatically update the ProjectSettings/ProjectSettings.asset
file when you edit it in the UI, but you should also be able to manually edit that file and set scriptingBackend.Standalone
to 0
.
... manually edit that file and set
scriptingBackend.Standalone
to0
.
This is what I needed: upstream repo had 1 and fork didn't have project settings saved (thanks Unity) so didn't push.
Now, with that working, WebGL build shows this and it works:
So that begs the question, why can't that work for other platforms on ubuntu-latest, or is there a ubuntu container we need to use that has IL2CPP installed, or is there a command we can invoke to install IL2CPP?
Ok so I switched back to IL2CPP for scripting backend and pushed, and applied a customImage to the workflow, and this failed for all except StandaloneLinux64.
Error building player because build target was unsupported
name: Unity Builder
on:
push:
paths:
- .github/workflows/UnityBuilder.yml
jobs:
buildForAllSupportedPlatforms:
name: Build for ${{ matrix.targetPlatform }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
targetPlatform:
- StandaloneOSX # Build a macOS standalone (Intel 64-bit).
- StandaloneWindows # Build a Windows standalone.
- StandaloneWindows64 # Build a Windows 64-bit standalone.
- StandaloneLinux64 # Build a Linux 64-bit standalone.
- iOS # Build an iOS player.
- Android # Build an Android .apk standalone app.
- WebGL # WebGL.
unityVersion:
- 2019.4.40f1
#- 2020.3.43f1
#- 2021.3.16f1
#- 2022.2.1f1
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Unity Builder
uses: game-ci/unity-builder@v2
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
with:
customImage: unityci/editor:ubuntu-2020.3.43f1-linux-il2cpp-1.0.1
targetPlatform: ${{ matrix.targetPlatform }}
unityVersion: ${{ matrix.unityVersion }}
- name: Archive Build
uses: actions/upload-artifact@v3
with:
name: Build-${{ matrix.targetPlatform }}
path: build/${{ matrix.targetPlatform }}
If you want IL2CPP for macOS, you need runs-on: macos-latest
, and if you want IL2CPP for Windows, you need runs-on: windows-2019
.
See the example: https://game.ci/docs/github/getting-started#advanced-il2cpp-example
Maybe we need to make this example easier to find?
You can only build IL2CPP for that platform that you're on.
* linux-il2cpp image can build Linux builds in IL2CPP mode. This image can be run from any runner that supports docker. * windows-il2cpp image can build Windows in IL2CPP mode. This image can only be run from a Windows runner.
On windows, licensing works differently. If you pass the documented parameters correctly, you should be able to build a Windows IL2CPP build.
Sound like there's just a small misconfiguration issue that occurred because you switched to a Windows runner and Windows activation works differently. Recommend testing that your variables are indeed passed into the workflow step. If nothing else works, please consult our troubleshooting section.
As I understand it, the IL2CPP scripting backend is popular for mobile platforms like Android and iOS. If you can only build IL2CPP for that platform that you're on, then is it impossible to create a mobile build with Game-CI using IL2CPP?
As I understand it, the IL2CPP scripting backend is popular for mobile platforms like Android and iOS. If you can only build IL2CPP for that platform that you're on, then is it impossible to create a mobile build with Game-CI using IL2CPP?
You can only build Desktop IL2CPP for that platform that you're on.
You can build mobile IL2CPP as long as the modules are installed.
You can build mobile IL2CPP as long as the modules are installed.
@davidmfinol, does this mean we can build on ubuntu-latest
without any problems? Will building on macos-latest
yield any performance improvements or other benefits, or is it better to use ubuntu-latest
when just building for iOS (and Android)?
Yep, recommend using ubuntu-latest when just building for iOS and Android
@asbjornu Note if you want to leverage Burst, you will need to build Android using Windows (now windows-2022 as we updated the images) and build iOS using macos (any version works, generally macos-latest works well). Closing this as the issue appears to be solved.
I feel like this should be a trivial question for unity-builder, but I'm struggling to build my game with il2cpp.
First I got this:
Then I tried to use a docker image that ended in
-il2cpp
, one of the ones here: https://hub.docker.com/r/unityci/editor/tags?page=1&name=windows-il2cppThat got an issue to do with not being able to be ran on linux architecture:
... So I moved to use Windows Server for my GitHub actions, where now I get this:
But I think this is a lost cause, since
UNITY_EMAIL
,UNITY_PASSWORD
andUNITY_LICENSE
are all set fine in the repository's secrets tab.I think I'm completely on the wrong track here and missing something really obvious, like a bit of xy problem going on.
Thanks.