Version: 2023.1
言語: 日本語
レジストリから名前を指定してパッケージをインストールする
ビルトインパッケージの無効化

インストールされたパッケージをプロジェクトから削除する

When you “remove” a Unity registry package or scoped registry package from your project, the Package Manager is actually removing the project’s direct dependency from your project manifest. The result of removing the direct dependency varies, based on the dependencies for the package you are removing:

  • If there are no other packages or feature sets that have a dependency on this package, any Editor or runtime functionality that it implemented is no longer available in your project. For more information about direct and indirect dependencies, refer to Dependency and resolution.
  • If another installed package or an installed feature set depends on the package you are trying to remove, this procedure removes only the dependency from your project manifest. The package itself and all of its functionality is still installed in your project, and appears in the In Project list context with the dependency icon .

はじめに

この作業を始める前に、以下の重要な注意事項を理解してください。

  • Use this procedure to remove a package only if you added it to the current project by installing it, such as (but not limited to) Installing a feature set, Installing from a registry, and installing custom packages. Don’t use this procedure to try to:

    • Remove Asset Store packages that you downloaded and imported to your project. For information about removing Asset Store packages that you downloaded and imported, refer to Remove imported assets from a project.
    • Remove local asset packages that you imported to your project. For information about removing local asset packages that you imported, refer to Removing local asset packages.
  • レジストリからインストール したパッケージをこの手順で削除すると、現在のプロジェクトからそのパッケージが削除されます。他のプロジェクトに存在する同じパッケージは削除されません。また、グローバルキャッシュからも同パッケージが削除されることもありません。このアクションは Package Manager ではサポートされておらず、手動でグローバルキャッシュを操作することは推奨されません。

プロジェクトに埋め込んだ パッケージをこの手順で削除すると、Package Manager はパッケージフォルダー全体をコンピューターから削除します。一方で、他のソースからインストールされたパッケージ (ローカル パッケージを含む) を削除すると、マニフェスト内のパッケージへの参照のみが削除され、パッケージ自体とそのコンテンツはそのまま残されます。

手順

インストールしたパッケージを削除するには、以下の手順を行います。

  1. Open the Package Manager window and select In Project from the Packages dropdown menu.

    コンテキストを In Project に切り替えます。
    コンテキストを In Project に切り替えます。
  2. パッケージリスト から削除したいパッケージを選択します。詳細ビュー に、そのパッケージの情報が表示されます。

  3. Click the Remove button.

    If this button is not displayed, you might be viewing the My Assets list. Refer to Before you begin.

    If this button is disabled, you can’t remove this package. For more information, refer to Locked and non-removable packages.

    Remove button in the corner of the details view
    Remove button in the corner of the details view

    プログレスバーが終了すると、 パッケージはリストから消えます。

  4. 削除したパッケージを復元したい場合は、パッケージのインストール の手順に従ってください。

Note: You can remove multiple packages with one click by using the multiple select feature. For more information, refer to Perform an action on multiple packages or feature sets.


ロックされ削除できないパッケージ

You can remove packages only if they’re not required by another package or a feature set. The Package Manager enforces this by disabling the Remove button for all required packages.

Required by 説明 
機能セット 機能セットがパッケージを必要とする場合、リストビューと詳細ビューの両方に、ロックアイコン () が表示されます。また、詳細ビューのパッケージ名の下には、そのパッケージを必要とする機能セットの名前が表示されます。

ただし、Unlock ボタンをクリックしても、そのパッケージを必要とする機能セットをすべて削除しない限り、プロジェクトからパッケージを削除することはできません。パッケージのロックを解除すると、プロジェクトに対し 別のバージョン をリクエストできますが、それでも削除はできません。
別のパッケージ 選択されたパッケージを必要とするパッケージが 1 つ以上ある場合は、Remove ボタンが無効化されます。依存関係があるパッケージの名前は、詳細ビューの Dependencies タブで確認できます。他のパッケージが不要な場合は、それを削除すれば、Package Manager もそのパッケージを自動的に削除します。

Note: You can unlock multiple packages with one click by using the multiple select feature. For more information, refer to Perform an action on multiple packages or feature sets.


レジストリから名前を指定してパッケージをインストールする
ビルトインパッケージの無効化