Sprite Atlas (スプライトアトラス) システムの元のバージョン 1 では、テクスチャ (スプライトやテクスチャ内のスプライト、およびフォルダー内のスプライトからの) をアトラステクスチャにパックします。バージョン 1 は、再生モードに入るときや、プレイヤーやアセットバンドルをビルドするときに、これらのテクスチャをパックします。AssetDatabase V1 は依存関係を持つことができず、名前付きオブジェクトのインポーターサポートもありません。そのため、Unity はカスタムメカニズムを通じてスプライトアトラスをパックし、テクスチャとレンダリングデータの出力データを Library/AtlasCache
フォルダーに保存します。
ノート: Unity 2022.2 以降、エディターのスプライトアトラスの Mode (モード) は、デフォルトで Sprite Atlas V2 - Enabled に設定されています。Sprite Atlas V2 (スプライトアトラス V2) は、オリジナルのスプライトアトラスシステムがサポートしなかった キャッシュサーバー サポートなど、AssetDatabase V2 (ADBV2) によって可能になった機能を使用します。
インスペクターのプロパティや設定には、以下の点を除き、スプライトアトラス V1 からの変更はありません。インポートされたスプライトアトラスオブジェクトは、Inspector の一番下に表示されます。
Inspector ウィンドウの一番下に表示される Pack Preview ウィンドウ。
スプライトアトラス V2 は、Unity 2022.2 以降のエディターではデフォルトで自動的に有効になります。以前のバージョンのスプライトアトラスを使用していたプロジェクトをアップグレードする場合は、Edit > Project Settings > Editor > Sprite Atlas > Mode の順に移動し、ドロップダウンメニューから Sprite Atlas V2 - Enabled を選択してください。
スプライトアトラス V2 を有効にすると、次のような効果が発生します。
新しいスプライトアトラスを作成すると、自動的に選択された Mode (モード) に設定されます。
Unity は、既存のスプライトアトラス V1 アセットをすべてスプライトアトラス V2 に自動的に移行します。
自動以降のため、スプライトアトラス V2 を有効にする前に、V1 のスプライトアトラスをバックアップしてください。V2 に変換されたアセットは V1 との互換性がなく、元に戻すことはできません。
スプライトアトラスの Mode で以下のスプライトアトラス V2 オプションを選択すると、以下が有効になります:
Sprite Atlas V2 - Enabled 選択すると、編集モードでも再生モードでも、スプライトは常にスプライトアトラスをテクスチャソースとして使用します。
Sprite Atlas V2 - Enabled for Builds を選択すると、Unity はプレイヤー、AssetBundles、または Addressabl ビルドスクリプトをビルドするときにのみスプライトアトラスをパックします。エディターが編集モードの場合、スプライトはパックされたスプライトアトラスのテクスチャではなく、オリジナルのテクスチャを使用し続けます。
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.