ここでは、Unity Package Manager の機能に関する多くの概念について説明します。
各パッケージには複数のバージョンがあり、ライフサイクルに沿ってそのパッケージに変更が加えられます。開発者がパッケージを更新するたびに、新しいバージョン番号が与えられ ます。パッケージバージョンの変更は、 セマンティックバージョニングにしたがって、破壊的変更 (メジャー)、新しい後方互換性機能 (マイナー)、バグ修正のみ (パッチ) のいずれであるかを示します。
特定のパッケージで使用可能なバージョンのリストを見るには、特定のバージョンの検索 を参照してください。
マニフェストファイルには 2 つのタイプがあります。
manifest.json
) は、Package Manager が正しいパッケージ (依存関係として宣言したパッケージやバージョンのリストなど) を見つけて読み込むために必要な情報を格納します。package.json
) は、特定のパッケージに関する情報と、そのパッケージが必要とするパッケージとバージョンのリストを格納します。どちらのファイルも JSON(JavaScript Object Notation) 構文を使用します。
Unity のパッケージマネージャの領域では、パッケージレジストリとは、パッケージのコンテンツや各パッケージのバージョンに関する情報 (メタデータ) を保存するサーバーのことです。Unity では、配布可能な公式パッケージのレジストリを一元管理しています。デフォルトでは、すべてのプロジェクトは公式の Unity パッケージレジストリを使用しますが、プライベートなパッケージを保存して配布したり、開発中のカスタムパッケージをステージングするために、追加のレジストリを作成する ことができます。
Unity Package Manager はパッケージシステム全体を管理するツールです。主なタスクは以下のとおりです。
The Unity Package Manager installs samples, tools, and assets on a per-project basis, rather than installing them across all projects for a specific machine or device. It uses a global cache to store downloaded package metadata and contents. Once installed in a project, Unity treats package assets just like any other asset in the project, except that these assets are stored inside the package folder and are immutable. You can permanently change content only from Local and Embedded package sources.
ソースには、 パッケージの出所が記載されています。
ソース | 説明 |
---|---|
レジストリ | Unity Package Manager がリクエストを受けると、ほとんどのパッケージをパッケージレジストリサーバーからコンピューターの グローバルキャッシュ にダウンロードします。これらのパッケージは変更不可能です。そのため、プロジェクトで使用することはできますが、パッケージの変更やパッケージマニフェストの変更はできません。 |
ビルトイン | これらのパッケージを使用すると、Unityの機能( Terrain (地形) Physics、アニメーションなど)を有効または無効にできます。それらは不変です。詳細については、 ビルトインパッケージを参照してください。 |
埋め込み | プロジェクトフォルダー内に格納されているパッケージは、すべて 埋み込まれて います。このソースは カスタム の状態に当たります。なぜなら、通常、 パッケージの開発を開始するときに、新しいパッケージに必要なすべてのスクリプト、ライブラリ、サンプル、その他のアセットをプロジェクトフォルダーの下のフォルダーに保存するからです。 |
ローカル | コンピューター上の 任意のフォルダーからパッケージをインストール できます (例えば、ローカルで開発リポジトリをクローンする場合)。 |
** Tarball (local)** | コンピューターの .tgz ファイルからパッケージをインストール できます。 Package Manager は .tgz ファイルからパッケージを抽出し、キャッシュに格納します。ただし、ローカルフォルダーからのインストールとは異なり、これらのパッケージは変更不可能です。 |
Git | Package Managerは、 Git ベースのパッケージを、パッケージレジストリサーバーからではなく、Git リポジトリから直接インストールします。 |
パッケージマニフェストを編集するには、パッケージの検査 を参照してください。
The Package Manager window displays a label that corresponds to some of these sources. For more information, see Labels.
Note: The Package Manager stores packages that you download from the Asset Store in a cache which is separate from the global cache. See Asset Store packages for more information.
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.