Version: Unity 6 Beta (6000.0)
Language : English
Scripting backends
IL2CPP Overview

Mono overview

The Mono scripting backendA framework that powers scripting in Unity. Unity supports three different scripting backends depending on target platform: Mono, .NET and IL2CPP. Universal Windows Platform, however, supports only two: .NET and IL2CPP. More info
See in Glossary
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

You can change the scripting backend Unity uses to build your application in one of two ways:

  • Through the Player SettingsSettings that let you set various player-specific options for the final game built by Unity. More info
    See in Glossary
    menu in the Editor. Perform the following steps to change the scripting backend through the Player settings menu:
    1. Go to Edit > Project Settings.
    2. Select Player to open the Player settings for the current platform in the InspectorA Unity window that displays information about the currently selected GameObject, asset or project settings, allowing you to inspect and edit the values. More info
      See in Glossary
      .
    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 IL2CPPA Unity-developed scripting back-end which you can use as an alternative to Mono when building projects for some platforms. More info
See in Glossary
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.

Scripting backends
IL2CPP Overview
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961