> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pixelatestudio.tomblack.ca/llms.txt
> Use this file to discover all available pages before exploring further.

# Export

> Export sprite sheets and animation assets, choose where files go and how they are named, and use them in your game.

Export turns a Pixelate Asset into ready-to-use files in your project: sliced sprite sheets, and optionally Animation Clips, an Animator Controller, a Sprite Library and normal maps. This page covers what Export writes, every Output setting, re-exporting, and how to use the result in a game.

## Export a Pixelate Asset

<Steps>
  <Step title="Check the Preview">
    The [Preview](/guides/preview) shows exactly what Export writes. Check each view and clip.
  </Step>

  <Step title="Click Export">
    **Export** is the button at the top of the Pixelate Asset Inspector. A progress bar shows each sheet being captured. Click **Cancel** to stop; nothing is changed on disk.
  </Step>

  <Step title="Find the files">
    When the export is done, a message under the button lists what was written, for example `Exported 4 textures and 4 animation clips to the Output folder.`, and the first sprite sheet is highlighted in the Project window. The Console has the full list of files.
  </Step>
</Steps>

If something blocks the export, such as a missing Source or an invalid file name, the Export button's tooltip starts with **Can't export:** and names the problem and its fix. Clicking Export anyway shows the messages under the button. See [Messages](/guides/pixelate-asset#messages).

The Inspector is locked while an export runs, so settings can't change halfway.

## What Export writes

| Output | When | Where |
| - | - | - |
| **Sprite sheets** | Always: one per camera view and clip (or particle seed variation, or still frame). | `{Output Folder}/{File Name}/{Clip}/` |
| **Normal maps** | When the Style Profile's [Lighting](/effects/lighting) effect has **Export Normal Map** on (the default). One per sprite sheet. | A `Normals` folder next to the sheets |
| **Animation Clips** | When **Create Animation Clips** is on and the asset is animated. One `.anim` per sprite sheet. | Next to its sheet |
| **Animator Controller** | When **Create Animator Controller** is on. One per Pixelate Asset. | `{Output Folder}/{File Name}/` |
| **Sprite Library** | When **Create Sprite Library** is on and the 2D Animation package is installed. One per Pixelate Asset. | `{Output Folder}/{File Name}/` |

Sprite sheets are unlit unless the Lighting effect's **Export Lit Sprites** is on. Everything else in the Style Profile (palette, dithering, lines, cleanup) is baked into the sheets.

### File layout

For the **UnityChan** sample (File Name `Player`, clips Run and Jump, views Right and Left), Export writes:

```text theme={null}
Player/
  Run/
    Player_Run_Right.png        sprite sheet
    Player_Run_Right.anim       Animation Clip
    Player_Run_Left.png
    Player_Run_Left.anim
    Normals/
      Player_Run_Right_N.png    normal map
      Player_Run_Left_N.png
  Jump/
    ...
  Player.controller             Animator Controller (optional)
  Player_SpriteLibrary.asset    Sprite Library (optional)
```

The clip folder is named after the clip. A still capture uses `Static` (for example `Chest/Static/Chest_Static_SW.png`), and a particle system uses `Particles` (`Particles_0`, `Particles_1` and so on with several seed variations).

### How sheets are imported

Every sheet is imported as a sprite sheet that's ready to use, so you don't need to touch its import settings:

* **Texture Type** Sprite, **Sprite Mode** Multiple, sliced on a fixed grid: one sprite per frame, named `{Sheet}_0`, `{Sheet}_1` and so on, left to right and top to bottom.
* Every frame of a sheet has the same size and the same pivot, so sprites never jitter between frames.
* **Pixels Per Unit** comes from the Style Profile's Profile Settings.
* **Filter Mode** is Point when the profile's **Pixelated** option is on (the default), Bilinear otherwise.
* No compression, no mipmaps, Clamp wrap mode, alpha used as transparency.

When you export again, the sprites keep their IDs, so SpriteRenderers, prefabs and animations that use them stay connected.

## Output settings

The **Output** section of the Pixelate Asset Inspector decides where files go, how they are named and what else Export creates.

| Setting | What it does | Default |
| - | - | - |
| **Output Folder** | The folder inside `Assets` that exports go into. Empty means the folder of the Pixelate Asset. | Empty (*Same folder as this asset*) |
| **File Name** | The name of the asset's export folder, and `{File}` in sheet names. | The Source's name (`PixelateSpriteSheet` for an empty asset) |
| **File Name Pattern** | How sheet files are named. See [File names](#file-names). | Empty (`{File}_{Clip}_{View}`) |
| **Pivot** | Where the pivot of every sprite sits: **Center**, **Bottom Center (Feet)** or **Custom**. See [Pivot](#pivot). | Center |
| **Overwrite Existing** | On: Export replaces earlier files in place. Off: Export writes numbered copies. See [Re-export](#re-export-and-outdated-assets). | On |
| **Create Animation Clips** | Writes an Animation Clip for each sheet. Shown for animated assets. | On |
| **Create Animator Controller** | Writes one Animator Controller with a state per clip. Shown under Create Animation Clips when it's on and the asset has more than one clip or view. Needs Create Animation Clips. | Off |
| **Create Sprite Library** | Writes a Sprite Library asset. Shown only when the 2D Animation package is installed. | Off |

New Pixelate Assets take their Output Folder, File Name Pattern, Pivot, Create Animation Clips and Overwrite Existing from the project defaults in [Settings](/guides/settings). Existing assets keep their own values.

### Output Folder

* **Click** the field to choose a folder. It must be inside your project's `Assets` folder.
* **Right-click** the field for **Choose Folder...** and **Use Same Folder as This Asset**, which clears the field.
* The grey line under the file name fields shows the exact folder, for example `Exports to Assets/Characters/Player/`. Hover it for the full path when it's shortened.

If the project default **Output Location** is a **Fixed Folder** with **Subfolder per Asset** (see [Settings](/guides/settings)), each new asset gets its own Output Folder inside the fixed folder, named after the Pixelate Asset: with the fixed folder `Assets/Exports`, a new asset named `Chest` gets the Output Folder `Assets/Exports/Chest`. It is filled in as a real folder when the asset is created, so it doesn't change if you rename the asset later. That gives each asset its own folder, even when two assets share a File Name.

You can also type `{Asset}` in the Output Folder yourself. It stands for the Pixelate Asset's name and is resolved when you export.

Exports always stay inside `Assets`. On Windows, a path longer than 259 characters is refused with an error; use a shorter Output Folder or File Name.

<Warning>
  Two Pixelate Assets with the same Output Folder and File Name would overwrite each other's sheets. A warning names the other assets; give each one its own **File Name**.
</Warning>

### File names

**File Name Pattern** builds each sheet's file name from four tokens:

| Token | Stands for |
| - | - |
| `{File}` | The **File Name** field. |
| `{Asset}` | The Pixelate Asset's own name. |
| `{Clip}` | The clip name, `Static` for a still frame, or `Particles` for a particle system (`Particles_0`, `Particles_1` and so on with several seed variations). |
| `{View}` | The camera view's **Label**. |

The pattern must contain `{Clip}` and `{View}`, so every sheet gets its own file. Leave it empty to use the default, `{File}_{Clip}_{View}`. The field applies your change when you press **Enter** or click away. Normal maps add the Lighting effect's **Normal Map Suffix** (`_N` by default), and `.png` is added for you.

Examples for the UnityChan sample (Pixelate Asset `UnityChan`, File Name `Player`, clip Run, view Right):

| Pattern | Sheet | Normal map |
| - | - | - |
| *(empty)* | `Player_Run_Right.png` | `Player_Run_Right_N.png` |
| `{Asset}_{View}_{Clip}` | `UnityChan_Right_Run.png` | `UnityChan_Right_Run_N.png` |
| `{Clip}-{View}` | `Run-Right.png` | `Run-Right_N.png` |

The pattern changes only file names. Folders are always `{Output Folder}/{File Name}/{Clip}/`. Animation Clips take the name of their sheet. A pattern with an unknown token, a stray brace, a character that isn't allowed in file names, or a period at the end shows an error until you fix it.

### Pivot

<img src="https://mintcdn.com/pixelate-studio/DbhZ9NuI41cwifFq/images/output-pivot.png?fit=max&auto=format&n=DbhZ9NuI41cwifFq&q=85&s=6018b5b9fe9b39604a72b12ab869ba12" alt="Output section with Pivot set to Bottom Center (Feet)" width="1010" height="160" data-path="images/output-pivot.png" />

| Pivot | Where it sits |
| - | - |
| **Center** | The middle of the cell. |
| **Bottom Center (Feet)** | The point where the source stands (below its origin, at the bottom of its meshes), worked out for each view and snapped to a whole pixel. Characters line up with the floor in every view. Particle systems use the bottom edge of the cell. |
| **Custom** | A point you set with **Custom Pivot**, as a fraction of the cell: (0, 0) is the bottom-left corner, (1, 1) the top right. Switching to Custom starts from the pivot the previous choice produced, so nothing jumps. |

To see the pivot, turn on **Show Pivot** in the Preview's gear menu. To start new assets with a different pivot, set **Default Pivot** in [Settings](/guides/settings).

### Animation Clips, Animator Controller and Sprite Library

<img src="https://mintcdn.com/pixelate-studio/DbhZ9NuI41cwifFq/images/output-generated-assets.png?fit=max&auto=format&n=DbhZ9NuI41cwifFq&q=85&s=50ba15a562f20280b65cd37ef74efe25" alt="Output options Create Animation Clips, Create Animator Controller and Create Sprite Library" width="490" height="148" data-path="images/output-generated-assets.png" />

These options only show when they apply, and a hidden option never changes the export.

<AccordionGroup>
  <Accordion title="Create Animation Clips">
    Shown when the asset is animated: a particle system, or a model or prefab with at least one clip. Export writes one `.anim` per sheet, next to it and named like it. The clip changes the **Sprite** of a SpriteRenderer on the same GameObject as the Animator, one frame at a time at the clip's **FPS**. It loops when the source clip has **Loop Time** on (for particles, when the first Particle System has **Looping** on).

    Export again to update the clips in place. References to them, and curves or events you added, stay intact.
  </Accordion>

  <Accordion title="Create Animator Controller">
    Shown under Create Animation Clips while it's on and the asset has more than one clip (or seed variation) or more than one camera view. Export writes `{File Name}.controller`:

    * With one view: one state per clip, named after the clip, in the Base Layer.
    * With several views: one sub-state machine per view, named after its Label, each with a state per clip.
    * The first clip of the first view is the default state. No parameters or transitions are added, so you can wire them up for your game.

    Export again to update the states' clips. Transitions, parameters, extra states and layers you added are kept.
  </Accordion>

  <Accordion title="Create Sprite Library">
    Shown only when the **2D Animation** package is installed. Export writes `{File Name}_SpriteLibrary.asset`. Each sheet becomes a category named `{Clip}_{View}` (for example `Run_Right`) and each frame a label (`0`, `1`, `2`, ...), so a Sprite Resolver can switch direction by category and frame by label.

    Export again to update the categories. Frames past the new frame count are removed, and categories you added are kept.
  </Accordion>
</AccordionGroup>

### Normal maps for 2D lights

When the Style Profile has a [Lighting](/effects/lighting) effect with **Export Normal Map** on, Export also writes a normal map for every sheet into a `Normals` folder, named with the effect's **Normal Map Suffix**. Each normal map is linked to its sprite sheet as the `_NormalMap` secondary texture, so sprites react to URP 2D Lights with no extra setup.

<img src="https://mintcdn.com/pixelate-studio/DbhZ9NuI41cwifFq/images/normal-map-2d-light.png?fit=max&auto=format&n=DbhZ9NuI41cwifFq&q=85&s=7061082db1d57ac1cf39e55ea2908ad5" alt="An exported sprite lit by a URP 2D point light from the left and right, with the normal map on and off" width="798" height="838" data-path="images/normal-map-2d-light.png" />

## Re-export and outdated assets

Export again whenever you change the asset, its Style Profile or its source. What happens to earlier files depends on **Overwrite Existing**:

* **On** (the default): sheets, Animation Clips, the Animator Controller and the Sprite Library are updated in place. Their GUIDs stay the same, so everything that uses them keeps working.
* **Off**: Export leaves earlier files alone and writes new ones with a number, such as `Player_Run_Right_1.png` and `Player_1.controller`.

Export never deletes files. If you rename a clip or view, or change the File Name, the files from the old name stay where they are; delete them yourself when you no longer need them.

The [Pixelate Browser](/guides/browser#status) shows whether each asset needs exporting: **Not Exported**, **Export Outdated** or **Up to Date**. After you change the Output Folder or File Name, an asset shows **Not Exported** until you export it again.

## Export many assets at once

To export several Pixelate Assets, open the [Pixelate Browser](/guides/browser), select them (or filter the list by **Status** to show only outdated ones) and click **Export** in the info strip, or right-click and choose **Export**. The assets export one after another with a progress bar:

* Click **Cancel** or press **Esc** to stop after the current asset. Assets already exported stay exported.
* If one asset fails, the others still export, and a list shows what failed and why.

Use **Validate** first to find problems in all selected assets without exporting.

## Use the output in your game

<Steps>
  <Step title="Add a sprite to the scene">
    Expand an exported sheet in the Project window and drag its first sprite into the Scene or Hierarchy. Unity creates a GameObject with a **Sprite Renderer**.
  </Step>

  <Step title="Add an Animator">
    Add an **Animator** component to the same GameObject and assign the exported `.controller` to **Controller**. Without a generated controller, drag an exported `.anim` onto the GameObject in the Hierarchy, and Unity creates a controller for you.
  </Step>

  <Step title="Press Play">
    The default state plays. To switch clips or directions, add parameters and transitions in the Animator window, or call `Animator.Play` from a script, for example `animator.Play("Base Layer.Right.Run")` for the Run state in the Right view's sub-state machine.
  </Step>
</Steps>

<Tip>
  The exported Animation Clips animate the Sprite Renderer on the **same GameObject** as the Animator. Keep both components together, or the animation won't find the sprite.
</Tip>

A few more tips:

* **Crisp pixels:** use the same **Pixels Per Unit** in your game's other 2D art, and a Pixel Perfect Camera set to that value.
* **Left and right:** a side-scroller can export one side only and flip the sprite with the Sprite Renderer's **Flip X**. See [Typical setups](/guides/camera-rigs#typical-setups).
* **Swap directions with the Sprite Library:** add a **Sprite Library** component with the exported library and a **Sprite Resolver** on the sprite, then pick the category (`Run_Right`) and label (frame).
* **2D lights:** with URP's 2D Renderer, sprites with exported normal maps use them automatically under 2D Lights. See [Lighting](/effects/lighting).

## Next steps

<Columns cols={2}>
  <Card title="Settings" icon="gear" href="/guides/settings">
    Set the export defaults for new Pixelate Assets.
  </Card>

  <Card title="Pixelate Browser" icon="table-cells" href="/guides/browser">
    Find outdated assets and export many at once.
  </Card>
</Columns>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.