Linux IL2CPP クロスコンパイラーは sysroot とツールチェーンのパッケージセットで、Linux 用 Unity エディターや Mono に頼ることなく、あらゆるスタンドアロンプラットフォーム上で Linux IL2CPP プレイヤーをビルドすることを可能にします。
要件を満たしていれば、Linux をビルドターゲットとして選択したときに、Unity が自動的にこれらのパッケージをインストールします。このプロセスを回避して、独自の sysroot とツールチェーンのパッケージを使用したい場合は、Edit > Project Settings > Toolchain Management の順に移動して、Install Toolchain package automatically チェックボックスを無効にしてください。すでにこれらのパッケージがインストールされている場合は、パッケージマネージャから削除する必要があります。
注意: IL2CPP の追加引数を設定すると、プロジェクトのコンパイルに影響する場合があります。詳細については、IL2CPP 追加引数のためのプラットフォーム固有の設定 を参照してください。
Unity は、IL2CPP クロスコンパイラーパッケージをインストールするために以下が必要です。
Linux の sysroot パッケージとは、Linux 用のビルドに必要なヘッダーやライブラリをすべて含んだディレクトリのことです。
オペレーティングシステム (OS) には、それぞれ異なる独自のビルドシステムがあります。特定の OS のヘッダーやライブラリを使ってビルドする場合、ビルドされたプレイヤーは他の OS では動作しない可能性があります。そこで、Unity では、サポートされているすべての Linux プラットフォームで動作するビルドを作成するために sysroot を提供しています。
Unity は、macOS、Windows、Linux 用のツールチェーンパッケージを提供しています。これらのプラットフォームは、それぞれ独自の方法で Linux 用のビルドを行います。
Linux ツールチェーンパッケージとは、Unity が Linux 用にビルドするために必要なツール (コンパイラーやリンカーを含む) を、これらの各 OS から集めたものです。
パッケージのダウンロード、解凍、およびその使用を考慮して、十分なディスク容量を確保してください。
まれに、十分な容量があるかどうかわからない場合は、UNITY_SYSROOT_CACHE 環境変数を定義して、圧縮されていない sysroot とツールチェーンのパッケージを保存するために使用します。環境変数とは Unity の外部で設定した変数で、Unity が参照できるものです。このケースでは、sysroot とツールチェーンのパッケージを解凍する際に Unity が参照できるキャッシュを設定します。環境変数は、OS に固有のものであるため、システムのガイドラインに従って設定する必要があります。
下の表は、各ツールチェーンパッケージに必要な総ディスク容量を示しています。
ツールチェーンパッケージ | 必要なディスク容量 |
---|---|
com.unity.toolchain.linux-x86_64 | 462MB |
com.unity.toolchain.macos-x86_64-linux-x86_64 | 2GB |
com.unity.toolchain.win-x86_64-linux-x86_64 | 2GB |
このページの要件をすべて満たしていれば、プロジェクトを Linux プレイヤーとしてビルドすることができます。Unity は、ビルド時に自動的に Linux IL2CPP クロスコンパイラーを使用します。
Linux プレイヤーをビルドするには、以下の手順で行います。
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?
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
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.