IL2CPP
编译器选项

使用 IL2CPP 来构建项目

To build your project using IL2CPP, open the Build Settings window (File > Build Settings). Select the platform you are building for, then click Player Settings to open the Player settings in the Inspector.

Build Settings 窗口
Build Settings 窗口

In the Project Settings window, locate the Player settings for your target platform, and scroll down to the Configuration section. For Scripting Backend, select IL2CPP.

The Configuration section of the Player settings
The Configuration section of the Player settings

在 Scripting Backend 中选择 IL2CPP 后,单击 Build Settings 窗口中的 Build。Unity 开始将 C# 代码和程序集转换为 C++,然后为目标平台生成二进制文件。

IL2CPP
编译器选项