How can I align sprites on a grid, even if they have different sizes?
When using TexturePacker's Grid/Strip algorithm, the cell size of the grid is determined by the largest sprite. This leads to inefficient use of texture space, as small sprites occupy only a fraction of their allocated cell.
Alternatively, you can use the MaxRects algorithm and set the Common Divisor X/Y parameters. They guarantee that the coordinates where a sprite is positioned on the texture are divisible by these values. Since these divisors can be smaller than the largest sprite size, the texture space can be used more effectively.

Grid layout (sprite sizes 32x32 and 64x64)

MaxRects layout with common divisor 32 (sprite sizes 32x32 and 64x64)
Note: The common divisor setting also ensures that sprite sizes are divisible by the chosen values, meaning sprites may be enlarged if necessary. However, if your sprites are already sized in multiples of the divisor (e.g., 32x32, 32x64, 64x64 with a divisor of 32), their dimensions will remain unchanged.