Set sprite borders

BeginnerDesigner

Sprite borders are areas that don't deform when you scale the sprite. These are often useful for sprites used for UI elements such as menu buttons. You can only set sprite borders for sprites set to the UI sheet type.

Original spriteScaled without bordersScaled with borders
Original spriteWith borderWith border
Edges are deformedEdges not deformed

Set sprite borders

  • In the Sprite Editor, make sure the sheet type is set to UI.

Choose UI

Note

This has no effect on how the sprite is rendered at runtime, but lets you set slightly different properties, including sprite borders.

  • From the Sprites list, select the sprite you want to add sprite borders to.

  • Make sure the texture region for the sprite is correct. For information about how to do this, see Edit sprites.

Select texture region

  • In the Sprite Editor toolbar, select Sprite border resize tool.

Border resize tool

  • Drag the sprite borders into position.
Note

By default, the sprite borders match the sprite texture region.

Tip

You can zoom in and out using Ctrl + mousewheel to make precise selections.

Lock the sprite borders

By default, sprite borders move as you resize the texture region. To stop this happening, click Lock the sprite borders in the toolbar.

Lock icon

Note

Sprite borders always stay inside the texture region.

See also