I think IL2CPP is no longer experimental.
Anyone has experience with it ? Is it dependable? What are the caveats?
We have been using IL2CPP for two years now and never had real issues with it. Code is faster and its required by certain platforms. Caveats are much longer build times.
Ps: IL2CPP is unrelated to the Unity 2019.3 beta. ![]()
I still have some problems with IL2CPP with MacOS Builds… Besides that, it’s working very well with all other platforms.
I’ve had some issues with lack of parity between mono and il2cpp a while ago with Activator.CreateInstance method though its likely been resolved by this point though I’m too lazy to actually test that out since I’m doing internal builds with mono.
Other than that, it’s great for releases.
Been using it in a game built on 2018.2.x for Windows standalone for over a year, and have not seen any IL2CPP specific issues during testing. Game is not yet released though. I believe it left experimental status in 2018.1.0.
Really?! We’ve been using IL2CPP since Apple required 64bit (was that 2015?) and I haven’t seen any IL2CPP related issues since maybe the first few releases, perhaps in Unity5 or whatever it was back then.
If you have a small project where IL2CPP can be proven to be failing, you should be filing a bug report with Unity. If it’s an IL2CPP bug then they WILL fix it.
EDIT on Dec 5, 2019: I believe I may have misunderstood your “MacOS Builds” statement above to instead read “building iOS on MacOS.” I actually do not have any IL2CPP usage on MacOSX target, just iOS.
But I do stand by my second line: report 'dem bugz!
awesome! I’ll install the dinosaur that is VS and jump on that wagon
Fairly certain you don’t need VS.
That’s true, I read past the 9th line of console and there it is: windows 10 sdk? thing got tons of options, do you know which ones are required?
After installing the SDK without the net and debug functions I’m getting the same error asking for SDK in the install register, which is already present.
here is the console spamola
Exception: C:\Program Files\Unity\Hub\Editor\2019.3.0f1\Editor\Data\il2cpp/build/deploy/net471/il2cpp.exe did not run properly!
UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at <3b74787e58694cdda2c241162159b3b7>:0)
UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at <3b74787e58694cdda2c241162159b3b7>:0)
UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1[T] arguments, System.Action`1[T] setupStartInfo, System.String workingDirectory) (at <3b74787e58694cdda2c241162159b3b7>:0)
UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (UnityEditor.Il2Cpp.Il2CppBuildPipelineData data, System.String outputDirectory, System.String workingDirectory, System.Boolean platformSupportsManagedDebugging) (at <3b74787e58694cdda2c241162159b3b7>:0)
UnityEditorInternal.IL2CPPBuilder.Run () (at <3b74787e58694cdda2c241162159b3b7>:0)
UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at <3b74787e58694cdda2c241162159b3b7>:0)
DesktopStandalonePostProcessor.SetupStagingArea (UnityEditor.Modules.BuildPostProcessArgs args, System.Collections.Generic.HashSet`1[T] filesToNotOverwrite) (at <3b74787e58694cdda2c241162159b3b7>:0)
DesktopStandalonePostProcessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at <3b74787e58694cdda2c241162159b3b7>:0)
Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
DesktopStandalonePostProcessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at <3b74787e58694cdda2c241162159b3b7>:0)
UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <3b74787e58694cdda2c241162159b3b7>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <3b74787e58694cdda2c241162159b3b7>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Note that it is necessary to install Visual Studio with the C++ development workload to use IL2CPP on Windows.
Regarding this error message, there should be another one near it in the editor log with more details about the cause of the error. Can you post it as well?
Oh I found the parity mismatch thing that I talked about, it was Process.Start() (was using it to restart the game instance).
In il2cpp you have to start applications a little bit differently unless the method works now.
The error log contradicts your statement so please correct it and improve the documentation. Requirements need to be on the first page of IL2CPP.
Here is the second error
Exception: C:\Program Files\Unity\Hub\Editor\2019.3.0f1\Editor\Data\il2cpp/build/deploy/net471/il2cpp.exe did not run properly!
UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at <3b74787e58694cdda2c241162159b3b7>:0)
UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at <3b74787e58694cdda2c241162159b3b7>:0)
UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1[T] arguments, System.Action`1[T] setupStartInfo, System.String workingDirectory) (at <3b74787e58694cdda2c241162159b3b7>:0)
UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (UnityEditor.Il2Cpp.Il2CppBuildPipelineData data, System.String outputDirectory, System.String workingDirectory, System.Boolean platformSupportsManagedDebugging) (at <3b74787e58694cdda2c241162159b3b7>:0)
UnityEditorInternal.IL2CPPBuilder.Run () (at <3b74787e58694cdda2c241162159b3b7>:0)
UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at <3b74787e58694cdda2c241162159b3b7>:0)
DesktopStandalonePostProcessor.SetupStagingArea (UnityEditor.Modules.BuildPostProcessArgs args, System.Collections.Generic.HashSet`1[T] filesToNotOverwrite) (at <3b74787e58694cdda2c241162159b3b7>:0)
DesktopStandalonePostProcessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at <3b74787e58694cdda2c241162159b3b7>:0)
Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
DesktopStandalonePostProcessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at <3b74787e58694cdda2c241162159b3b7>:0)
UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <3b74787e58694cdda2c241162159b3b7>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <3b74787e58694cdda2c241162159b3b7>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
and since I have a few more characters left:
Build completed with a result of 'Failed'
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00275] in <3b74787e58694cdda2c241162159b3b7>:0
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <3b74787e58694cdda2c241162159b3b7>:0
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
I’m unsure how the error log contradicts my statement that Visual Studio is required. In any case, I think there should still be another error in the editor log which indicates more specifically what is wrong. Can you please have another look at it?
it does:
In order to build C++ code for Windows Desktop, you must have one of these installed:
-
-
Windows 10 SDK is found by looking at "SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0\InstallationFolder" in the registry
oh on fourth reading I see what you mean, it does say that, but the formatting is wrong because it doesn’t use indentation properly to box information and the information isn’t prioritized causing information overload.
What you need to do is go straight to the relevant information like this:
IL2CPP is unable to build C++ code.
In order to build C++ code for Windows Desktop, you must have:
- Windows 10 SDK
- either Visual Studio 2015 with C++ compiler or 2017 with C++ compilers.
See how much simpler and clearer that is?
As for the registry crap, it’s information overload and it’s MS responsibility so it’s google space (i mean bing space) and you can toss that away or if you’ve met anyone who had such problem, put it at the end after the important info.
I’m spending time delineating what’s wrong with this error code because it’s all over unity and there need to be a set of rules on information priority and how to communicate clearly (which the documentation team does rather well, so maybe they should be the console police)
these are all 4 errors I gave you.

Since VS 2019 is the one installed by the unity installer, is there a way to coax this to spit out IL2CPP?
When VS 2019 is installed with Unity, I believe that only the C# workload is installed by default. I think you will need to use the VS installer to add the C++ workload in order to compile IL2CPP-generated C++ code.
I added 2017 c++ compilo and it works. thanks.