Auto Atlas

    Create a new auto-atlas.pac resource in the Assets panel by clicking the + Create button in the upper left corner and then selecting Auto Atlas.

    AutoAtlas will pack all SpriteFrame assets in the same folder into a big Sprite Atlas asset during the build process. We might add other ways to choose assets for packing in the future. If the original SpriteFrame asset have been configured, then all configurations will be preserved.

    After selecting an Auto Atlas Resource in the Assets panel, the Inspector panel will display all of the configurable items for the Auto Atlas Resource.

    The rest of the properties are the same as Texture, please refer to the Texture documentation for details.

    After the configuration is complete, click the Preview button to preview the packaged results. The related results generated according to the current automatic atlas configuration will be displayed in the area below the Inspector panel.

    The results are divided into:

    • Unpacked Textures: Display the broken image assets that cannot be packed into the atlas. The cause may be that the size of these broken image assets is larger than the size of the atlas assets. At this time, the configuration or fragmentation of the following atlas may need to be adjusted. The size of the figure is increased.

    In general, after Atlas asset is generated, the Texture2D assets and Image assets related by the original split assets will be deleted in the package. The following two special cases will have special process:

    1. When any Texture2D asset depended by SpriteFrame assets in the Atlas asset’s folder is directly used by another asset, the dependent Texture2D asset and Image asset will also be generated.

    The two situations above will increase the package size, please do not use an Atlas like this unless necessary, Builder will also produce a console warning to prompt you to consider your package size.