A packer utility that can merge textures. TexturePacker is a utility class that allows you to merge multiple textures into a single texture atlas. Adds a texture to the packer and returns an [AtlasTexture] representing the added texture. Clears all textures from the packer. Returns the generated ImageTexture at the given index. Returns the number of generated textures in the packer. Returns the original [Texture2D] at the given index. Returns an [AtlasTexture] representing the given Texture2D. Returns the number of textures added to the packer. Returns an [AtlasTexture] representing the texture at the given index. Merges all added textures into a single texture atlas. Removes the specified texture from the packer. Removes the texture at the specified index from the packer. Unreferences the specified texture and returns true if successful, false otherwise. Unreferences the texture at the specified index and returns true if successful, false otherwise. The background color of the texture atlas. If true, the original atlases will be kept in memory after merging. The margin between textures in the atlas. The maximum size of the texture atlas. Texture flags applied to the generated atlas.