Using with 2D Objects

Learn how to use N-Slicer with regular 2D objects

Using with Regular 2D Objects

N-Slicer can be applied not only to UI but also to regular 2D objects.

Creating an N-Sliced Sprite

In the hierarchy window, select right click -> 2D Object -> Sprites -> N-Sliced.

NSlice2DCreation

N-SlicedObject

An object named N-Sliced will be created.

Configuration

Just like with UI, you can create a new N-Slice Data or input existing N-Slice Data in the inspector window.

N-SliceSpriteRendererInspector

Adjusting the Size

When adjusting the size of N Slice Sprite Renderer, directly manipulating with the mouse in the Unity Editor's Scene window will adjust the Transform's scale.

Therefore, when adjusting the size, you should directly modify the size values.

SpriteRendererWarning

This ensures that the N-Slice settings are properly applied to the sprite renderer, maintaining the appropriate stretching and fixed areas as configured in your N-Slice Data.