I’m curious as to why there is no “Windows (IL2CPP)” build module for macOS installations of Unity? I see the Mac build support on macOS has IL2CPP, but Windows and Linux only have Mono. Is there a way to add IL2CPP build support, or a work around or something?
Because of difficulty getting the Windows MSVC compiler to work on macOS, we don’t have support for this cross-compilation scenario. If you do want to build a Windows Desktop Standalone Player on macOS, you can do so with the Mono scripting backend.
Thanks for the info. That’s pretty much in line with what I figured the answer would be
@JoshPeterson Hi Joshua. Do you consider switching to clang or gcc for cross compiling anywhere in the future? Would be great to be able to build all platforms from macOS (our common build-server)
Honestly, I don’t expect this to be supported soon. I’m not even sure if clang or gcc on macOS are capable of cross compiling to Windows. I feel like it would be difficult to get the standard library for Windows available on macOS. So unfortunately, this is not something we plan to support for IL2CPP.
With that said, it is possible to cross-compile player build for desktop platforms with the Mono scripting backend.
Is it safe to use Mono (for Windows builds) in terms of project decompilation/hacking? (This is important for online games.)
Or should I buy a Windows PC to build with IL2CPP? (Mac ARM is not very compatible with Windows today.)
Is it possible to build Windows IL2CPP on a remote machine somehow?
And is there any way to use a virtual Windows environment on Mac ARM to build Windows IL2CPP?
Short answer: No.
Long answer: Neither is IL2CPP safe.
Decompiling IL2CPP is only more complicated, but there already exist tools (not made by Unity) to decompile IL2CPP.
The truth is, for code to run on your machine, it needs to be readable, and therefore decompilable. If you want some measure of security for say an online game, it’s mostly your server’s job to ensure the client is “honest”.
As for your second question, I haven’t personally tried, my guess would be yes it is possible, but that’s a guess.
Hi, would using CrossOver or VMWare Fusion (or other VM solutions) would work on Apple Silicon macs for Windows IL2CPP builds? I believe they should just works, but slow.
Update: I couldn’t install Unity Hub with CrossOver. It says “Close the Unity Hub”, but there is no running Unity Hub while installing it =') Anyway; I am trying with VMware Fusion right now. ARM64 version Windows 11 + Unity Hub is working; but it’s a bit slow. I’ll update my post when I finish the IL2CPP build (it’ll probably gonna take 3 hours or something
).
Update 2: Well, after 1h 22m later Unity failed build saying:
Internal build system error. BuildProgram exited with code 1.
error: Could not set up a toolchain for Architecture x64. Make sure you have the right build tools installed for il2cpp builds.
After, 1 hour 22 minutes later. =( I think this fail should be at the beginning. There is no mention anywhere about this missing tool before I started to build. I will try to install these tools, then I will update the result. Probably tomorrow.
Update 3: YES! It worked!
Installed Visual Studio 2022 with C++ tools
Update 4: I’d suggest you to use x64 version of Unity Editor; because some plugins or packages might not have arm64 libraries yet, so there might be some problems. x64 version is a bit slower than arm64; but works much stable (even in the builds we had problems/differences between them).