Generally, you can apply the 9-slice technique to a regular 2D Sprite. However, with UI(User Interface) Allows a user to interact with your application. Unity currently supports three UI systems. More info
See in Glossary Toolkit, you can apply the 9-slice technique to Texture, Render TextureA special type of Texture that is created and updated at runtime. To use them, first create a new Render Texture and designate one of your Cameras to render into it. Then you can use the Render Texture in a Material just like a regular Texture. More info
See in Glossary, and SVG Vector images.
To apply the 9-slice technique to an image:
To apply the 9-slice technique to a selected image with USS:
You can also specify the slice values directly in USS, UXML, or C# files for the following properties:
-unity-slice-left
-unity-slice-right
-unity-slice-top
-unity-slice-bottom
-unity-slice-scale
Important:
VisualElement
class. You can style the look, define the behaviour, and display it on screen as part of the UI. More info