Version: 2021.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 doesn’t automatically load a prepared Sprite Atlas at run time (for example, when no Sprite Atlases are included in the build.

运行时的精灵枚举

要在运行时获取精灵图集的内容,请按照下列步骤操作:

  1. Create a custom component that takes SpriteAtlas as a public variable. 2.为字段分配精灵图集。 3.进入 Editor 的播放模式。 4.访问该变量并调用属性 .GetSprites 来获取所选图集内包含的精灵数组。
分发方法
解析不同的精灵图集情形