開発中のイテレーションを高速化するために、Unity はインクリメンタルな (増分) ビルドパイプラインを使用しており、アプリケーションの一部が前回のビルド以降に変更された場合のみ再ビルドされます。これには、アセットシリアライゼーション、コードコンパイル、データ圧縮、署名などのビルドステップが含まれます。デフォルトでは、Unity はリリース用と開発用の両方のビルドにインクリメンタルビルドパイプラインを使用します。
インクリメンタルビルドパイプラインは、Scripts Only Build 機能も自動化します。 そのため、インクリメンタルビルドを使用しないプラットフォームでは、Scripts Only Build は Build Settings ウィンドウでのみ利用可能です。
インクリメンタルビルドパイプラインは、Mono と IL2CPP スクリプトバックエンド の両方で動作します。ただし、出力ファイルの構造は、プロジェクトがどちらのスクリプトバックエンドを使用するかによって変わります。
Unity は以下のプラットフォームに対して、インクリメンタルビルドパイプラインをサポートします。
あるシナリオでは、インクリメンタルビルドパイプラインを使用しないビルドを作成することが有用または必要になる場合があります。
インクリメンタルでない、クリーンなビルドを作成するためには、以下を行います。
一般に、インクリメンタルビルド後に期待した変更がなく、インクリメンタルビルドパイプラインに問題があると考えられる場合は、クリーンビルドを作成します。この問題の最も一般的な理由は、アセットに影響を与えるビルドプロセスのコールバックの実装または変更によるものです。
ビルドプロセスは、実装したコールバックがどのようにアセットに影響を与えたかを知ることはできないので、アセットをどのように再ビルドするかを決定することができません。Unity は、ファイルの依存関係が変更された場合のみファイルを再生成します。つまり、コールバックが Unity が生成するファイルを変更し、ファイルの依存関係が変更されない場合、コールバックは既に変更されたファイルに変更を適用します。例えば、コールバックが Android App Manifest に新しいエントリーを追加し、Android App Manifest の依存関係が変更されない場合、コールバックは新しいエントリーを追加したままで、無効なファイルが生成されることになります。
開発ビルドの場合、コールバックまたはその入力データを変更し、コールバックが影響するアセットを Unity で再ビルドしたい場合は、クリーンビルドを作成します。リリースビルドの場合、Unity はすべてのアセットを再ビルドするので、クリーンビルドを作成する必要はありません。コールバックの例としては、コールバックまたはその入力データを変更し、コールバックが影響するアセットを Unity で再ビルドする場合、クリーンビルドを作成します。以下もコールバックの例です。
ノート: アセットに変更を加える場合、Unity はアプリケーションをビルドする際にそのアセットを再ビルドします。これには、それに影響するすべてのコールバックの処理も含まれます。つまり、アセットを変更する際にビルドプロセスのコールバックのみを変更する場合は、クリーン ビルドを作成する必要はありません。
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.