パッケージは、以下のようなさまざまなタイプの機能やアセットを格納するコンテナです。
パッケージは、Package Manager を通して Unity を幅広く強化します。エディターのメニューから Window > Package Manager の順に移動し、Package Manager ウィンドウ にアクセスできます。
ノート: Package Manager は、Unity Asset Store からすでにダウンロードまたはインポートした Asset Store パッケージ の表示にも対応しています。
Unity がプロジェクトを開くと、Unity Package Manager は、プロジェクトマニフェスト (1) を読み込んで、そのプロジェクトでロードするパッケージを把握します。次に、パッケージレジストリサーバー (3) に、マニフェストで依存関係にあるとされる各パッケージに対してリクエスト (2) を送信します。その後、パッケージレジストリは、要求された情報やデータを Package Manager (4) に送信し、Package Manager は、それらのパッケージ (5) をプロジェクトにインストールします。各プロジェクトは独自のマニフェストを持っており、そのプロジェクトの “依存関係” としてロードするパッケージを列挙しています。
プロジェクトにパッケージを加える場合は、そのパッケージを依存関係の一覧に含めるように プロジェクトマニフェスト を更新する必要があります。必要に応じて、プロジェクトマニフェストを直接変更できますが、Package Manager にそれを行わせるほうがより安全で簡単です。ユーザーインターフェースの使用に関する詳細は、Package Manager ウィンドウ の ドキュメントを参照してください。
Package Manager は、ユーザー、マニフェスト、レジストリと通信するために 3 つのインターフェースを使用します。
インターフェース | 使い方 |
---|---|
ユーザーインターフェース | Package Manager ウィンドウ を使用すると、機能をすばやく検索できます。また、インストールおよび更新したいパッケージを簡単に選択し、 パッケージの依存関係の競合を解決することもできます。Package Manager は、 プロジェクトマニフェスト に直接変更を加えるためのユーザーインターフェースを備えています。 |
パッケージマニフェスト | Package Manager は Unity に 専用のインスペクター を提供します。これにより、パッケージの マニフェスト を表示でき、同時に Project ウィンドウでマニフェストにフォーカスすることができます。この 統合により、埋め込み パッケージや ローカル パッケージのパッケージマニフェストを Unity で直接編集することもできます。 |
スクリプティング API | Package Manager スクリプティング API を使用すると、ユーザーはプログラムで Package Manager を操作できます。これを使用すると、 パッケージレジストリのクエリ、パッケージのインストール、埋め込み、削除、また、さまざまな条件を使用したパッケージの列挙などを行うことができます。 |
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.