現在のスプライトアトラスは、テクスチャ (スプライトやテクスチャ内のスプライト、およびフォルダー内のスプライトからの) をアトラステクスチャにパックします。再生モードに入るときや、プレイヤーやアセットバンドルをビルドするときに、これらのテクスチャをパックします。
パッキングの動作を設定するには、Edit > Project Settings > Editor > Sprite Packer と移動し、Mode のドロップダウンメニューからオプションを選択します。
Sprite Packer Mode を Sprite Atlas V2 Experimental に設定
AssetDatabase V1 は、依存関係を持つことができず、名前付きオブジェクトに対する Importer のサポートもありません。そこで Unity は、独自の仕組みでスプライトアトラスをパックし、テクスチャとレンダーデータの出力データを Library/AtlasCache フォルダーに保存します。
ただし、スプライトアトラスの V1 では、キャッシュサーバー をサポートしていません。Unity がキャッシュできるのは、Library フォルダーに保存された Artifact (インポート処理で生成されたデータ) のみです。また、インポーター を使用していないため、現在のシステムでは、AssetDatabase V2 (ADBV2) で公開されている機能のうち、キャッシュサーバーのサポートなど、一部を使用できません。
V2 実験システムは、以下の基準で開発されています。
キャッシュサーバーおよびその他の ADBV2 機能をサポートするインポーターの ワークフローを使用します。
スプライトアトラスランタイムオブジェクトに変更はありません。
現行のスプライトアトラスからスプライトアトラス V2 への移行パスを確保します。
UX のワークフローに大きな変更はありません。
以下の点を除き、Inspector のプロパティや設定にはスプライトアトラス V1 から変更はありません。
Objects for Packing に直接フォルダーをドラッグして、スプライトアトラス V2 にパックするコンテンツを加えることはできませんが、スプライトやテクスチャをウィンドウに直接ドラッグすることはサポートされています。
Inspector の下部に、インポートしたスプライトアトラスオブジェクトが表示されます。
更新された Inspector プロパティ
実験的な Sprite Atlas V2 モードを有効にするには、Edit > Project Settings > Sprite Packer に移動し、Mode のドロップダウンメニューを開き、Sprite Atlas V2 (Experimental) - Enabled を選択します。
実験的に開発された Sprite Atlas V2 を有効にすると、以下のようになります。
アセットメニュー (Assets > Create > Sprite Atlas) でスプライトアトラスを作成すると、デフォルトのモードになります。
Unity は、既存の Sprite Atlas V1 アセットをすべて Sprite Atlas V2 に自動的に移行します。
自動以降のため、スプライトアトラス V2 を有効にする前に、V1 のスプライトアトラスをバックアップしてください。V2 に変換されたアセットは V1 との互換性がなく、元に戻すことはできません。
スクリプトによるスプライトアトラス V2 の編集は現在サポートされていません。
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.