Version: 2022.2
言語: 日本語
スクリプティングバックエンド
IL2CPP の概要

Mono overview

The Mono scripting backend compiles code at runtime, with a technique called just-in-time compilation (JIT). Unity uses a fork of the open source Mono project.

Some platforms don’t support JIT compilation, so the Mono backend doesn’t work on every platform. Other platforms support JIT and Mono but not ahead-of-time compilation (AOT), and so can’t support the IL2CPP backend. When a platform can support both backends, Mono is the default. For more information, see Scripting restrictions.

Mono supports the debugging of managed code. For more information, see Debugging C# code in Unity.

Building a project using Mono

Unity がアプリケーションのビルドに使用するスクリプティングバックエンドを変更するには、次の 2 つの方法があります。

  • Through the Player Settings menu in the Editor. Perform the following steps to change the scripting backend through the Player settings menu:
    1. Edit > Project Settings の順に移動します。
    2. Select Player to open the Player settings for the current platform in the Inspector.
    3. Under the Other Settings sub-menu, navigate to Configuration > Scripting Backend.
    4. Select Mono.
  • Through the Editor scripting API. Use the PlayerSettings.SetScriptingBackend property to change the scripting backend that Unity uses.
The Configuration section of the Player settings
The Configuration section of the Player settings

To start the build process, open the Build Settings window (Menu: File > Build Settings) and select Build.

Both the Mono and IL2CPP scripting backends require a new build for each platform you want to target. For example, to support both the Android and iOS platforms, you need to build your application twice and produce two binary files, one for Android and one for iOS.

スクリプティングバックエンド
IL2CPP の概要