Upon starting a build using IL2CPP, Unity automatically performs the following steps:
Unity Scripting API code is compiled to regular .NET DLLs (managed assemblies).
All managed assemblies that aren’t part of scripts (such as plugins and base class libraries) are processed by a Unity tool called Unused Bytecode Stripper, which finds all unused classes and methods and removes them from these DLLs (Dynamic Link Library). This step significantly reduces the size of a built game.
All managed assemblies are then converted to standard C++ code.
The generated C++ code and the runtime part of IL2CPP is compiled using a native platform compiler.
Finally, the code is linked into either an executable file or a DLL, depending on the platform you are targeting.
IL2CPP provides a few useful options which you can control by attributes in your scripts. See documentation on Platform-dependent compilation for further information.
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Is something described here not working as you expect it to? It might be a Known Issue. Please check with the Issue Tracker at issuetracker.unity3d.com.
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information