ノート: シーン、サンプル、ツール、その他のアセットを共有したい場合は、独自の Unity パッケージを作成 することを推奨します。ただし、アセットパッケージ (.unitypackage
) 形式を使用することもできます。例えば、アセットパッケージを作成して、多くのアセットやシーン全体をプロジェクト間でコピーしたい場合などです。
ノート: アセットの品質が高く、他のユーザーに役立つと思われる場合は、アセットストアへの公開 の ドキュメントの手順に従ってパッケージのドラフトを作成し、アセットストアにアップロードします。
独自のカスタムアセットパッケージを作成する方法は、以下の通りです。
エクスポートしたいアセットが含まれているプロジェクトを開きます。
メニューから Assets > Export Package を選択し、 Exporting package ダイアログボックスを開きます。
ダイアログボックスで、パッケージに加えるアセットのチェックボックスをクリックして選択します。
Include dependencies を有効のままにすると、すでに選択したアセットが使用するアセットをすべて自動選択します。
Export をクリックしてファイルエクスプローラーを開き、 パッケージファイルを保存する場所を選択します。
パッケージに名前を付けて、任意の場所に保存します。
ヒント: パッケージをエクスポートするとき Unity はすべての依存関係もエクスポートします。例えば、シーンを選択してすべての依存関係も含めてパッケージをエクスポートすると、シーンに表示されるすべてのモデル、テクスチャ、その他のアセットも同様にエクスポートされます。これは、一群のアセットを手動で検索することなくエクスポートする素早い方法です。
ノート: Include dependencies を選択し、現在の選択範囲にスクリプトが含まれているか参照されている場合、Unity はプロジェクトにすべてのスクリプトを加えます。これは、選択範囲内のスクリプトが他のスクリプトを参照しているかどうかを判断する方法が Unity にはないためです。たとえば、エクスポートするためにプロジェクトのシーンのアセットを選択し、そのシーンにスクリプトがアタッチされたゲームオブジェクトが含まれている場合、Unity はプロジェクト内のすべてのスクリプトを依存関係とみなします。Unity にこのような処理をさせたくない場合は、 Include dependencies のチェックを外してください。
アセットパッケージのコンテンツを変更し、アセットパッケージの新しい、更新されたバージョンを作成したい場合は、パッケージに必要なアセットファイル (変更のないものと新しいものの両方) を選択します。次に、上記の手順に従ってファイルをエクスポートします。
更新したパッケージの名前を、MyAssetPackageVer1
、MyAssetPackageVer2
などのようにインクリメンタルな名前にします。Unity はそれを更新として認識します。そのため、自分自身とそのパッケージを共有する人にとって明確な命名規則を使用する必要があります。
Warning: Don’t remove files from asset packages and then add different files with the same name. Unity uses unique IDs to track files, so it recognizes them as different and possibly conflicting files. In these cases, Unity displays a warning symbol when importing them. If you have removed a file and then decide to replace it, rename it something else, even if it is close to the original name.
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.