# pack_sprite_sheet

Pack separate frame images into one uniform-cell sprite sheet on a transparent background.

A deterministic file operation: no model runs and no Creative Units are spent. Frames fill  
the grid in the order given; every frame is centered at its own scale in a cell of one size,  
so frames cut from one sheet or drawn at one scale stay registered. The tool centers: it  
does not align ground lines or rescale one frame against another. A frame larger than the  
cell is scaled down to fit, never cropped; a smaller one is never enlarged.

When every frame is a game tile (made with \`tile\_grid\`), the frames are aligned on their  
anchor instead: each keeps its scale, every frame's anchor (the bottom center of the cell it  
stands on) sits at the same point of its cell, \`cell\_width\`/\`cell\_height\` are ignored, and  
\`frames\` lists each frame's rect on the sheet with its cell center, anchor and Unity pivot.  
For a tileset an engine imports directly, use \`export\_tileset\` instead. The sheet is saved to the  
workspace library and, when the call runs in a session, placed on its board  
(\`sheet.placed\_on\_board\`).

## Parameters

| Parameter             | Type              | Default | Description                                                                                  |
| --------------------- | ----------------- | ------- | -------------------------------------------------------------------------------------------- |
| file\_idsrequired     | string (uuid)\[\] | —       | The frames, in reading order (left to right, then top to bottom): workspace file ids.        |
| columns               | integer0–16       | 0       | Cells across. When columns and rows are both 0, lays every frame in one row.                 |
| rows                  | integer0–16       | 0       | Cells down. 0 derives it from columns and frame count.                                       |
| cell\_width           | integer1–4096     | —       | Uniform cell width in pixels. Omit to use the widest frame without scaling smaller frames.   |
| cell\_height          | integer1–4096     | —       | Uniform cell height in pixels. Omit to use the tallest frame without scaling smaller frames. |
| padding               | integer0–512      | 0       | Transparent gutter between cells, in pixels.                                                 |
| name                  | string0–120 chars | —       | File name for the sheet.                                                                     |
| workspace\_idrequired | string (uuid)     | —       | The user's workspace id.                                                                     |
| session\_id           | string (uuid)     | —       | Session whose board receives the sheet. Omit to only save it to the library.                 |
