# Mono の概要

> Mono is a stable, mature .NET runtime that provides a managed environment for the just-in-time (JIT) compilation of your C# code.

**Mono スクリプティングバックエンド**は、実行時コンパイル (JIT) と呼ばれる手法で、コードをランタイムにコンパイルします。Unity はオープンソース [Mono プロジェクト](https://www.mono-project.com/)の[フォーク](https://github.com/Unity-Technologies/mono)を使用します。

プラットフォームによっては JIT コンパイルをサポートしていないものもあります。そのため、Mono バックエンドはすべてのプラットフォームで動作するわけではありません。他のプラットフォームは JIT と Mono をサポートしますが、Ahead-of-Time コンパイル (AOT) はサポートしないため、[IL2CPP バックエンド](/engine/6000.0/manual/scripting/compilation-and-code-reload/backends/il2cpp.md)をサポートできません。プラットフォームが両方のバックエンドをサポートできる場合は、Mono がデフォルトです。詳細については、[スクリプトの制限](/engine/6000.0/manual/scripting/compilation-and-code-reload/backends/restrictions.md)を参照してください。

Mono はマネージコードのデバッグをサポートします。詳細については、[Unity での C# コードのデバッグ](/engine/6000.0/manual/scripting/debugging-and-diagnostics/managed-code-debugging.md)を参照してください。

## Mono を使用したプロジェクトのビルド

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

* エディターの **Player Settings** メニューから。以下の手順で、**Player** 設定メニューからスクリプティングバックエンドを変更します。

  1. **Edit** > **Project Settings** に移動します。
  2. **Player** を選択して、[Inspector](/engine/6000.0/manual/unity-editor/using-the-editor/using-the-inspector.md) で現在のプラットフォームの [Player](/engine/6000.0/manual/unity-editor/editor-features/comp-manager-group/class-player-settings.md) 設定を開きます。
  3. **Other Settings** サブメニューで、**Configuration** > **Scripting Backend** に移動します。
  4. **Mono** を選択します。

* エディターのスクリプティング API から。[PlayerSettings.SetScriptingBackend](/engine/6000.0/script-reference/unity-editor/player-settings/set-scripting-backend.md) プロパティを使用して、Unity が使用するスクリプティングバックエンドを変更します。


**Player 設定の Configuration セクション:**
![](/api/media?file=/engine/6000.0/media/images/backend-mono.png)

ビルドプロセスを開始するには、**Build Profiles** ウィンドウ (メニュー: **File** > **Build Profiles**) を開き、**Build** を選択します。

Mono と IL2CPP のどちらのスクリプティングバックエンドも、ターゲットとするプラットフォームごとに新規にビルドする必要があります。例えば、Android と iOS の両方のプラットフォームをサポートするためには、アプリケーションを 2 回ビルドし、Android 用と iOS 用の 2 つのバイナリファイルを生成する必要があります。

## 追加リソース

* [Unity .NET の機能](/engine/6000.0/manual/scripting/environment-and-tools/overview-of-dot-net-in-unity.md)
* [ビルドプロファイル](/engine/6000.0/manual/unity-editor/editor-features/build-settings.md)
