Version: 2019.3
配布の方法
さまざまなスプライトアトラスのシナリオの解決

遅延バインディング

Late Binding is the name of a process in which you load or swap in the desired Sprite Atlas at run time via the Sprite Atlas API. This is necessary when the build does not automatically load a prepared Sprite Atlas at run time (for example, when no Sprite Atlases are included in the build.

実行時のスプライト列挙

ランタイムにスプライトアトラスのコンテンツを取得するには、以下の手順を行います。

  1. SpriteAtlas をパブリック変数として使用する カスタムコンポーネント を作成します。
  2. フィールドに スプライトアトラス を割り当てます。
  3. エディターを 再生モード にします。
  4. 変数にアクセスしてプロパティー .GetSprites を呼び出し、選択したアトラスにパックしたスプライトの配列を取得します。
配布の方法
さまざまなスプライトアトラスのシナリオの解決
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961