Sprite component reference

Using Sprites is the most common way to display images in a 2D game. By adding the Sprite component to a node you can display images from the project resources within the scene.

add sprite

Click the Add Component button at the bottom of the Properties panel and select Sprite from Add Rendering Component to add the Sprite component to the node.

Sprite attribute

Attribute Function Explanation
Atlas Atlas resource which the Sprite display image resource belongs to.
Sprite Frame SpriteFrame image resource which is used to render the Sprite.
Type Rendering mode, currently includes Simple and Sliced rendering modes.
Use Original Size Whether to use the original size of the image resource as the Sprite node size.

Detailed explanation

After adding the Sprite component, drag the Texture or SpriteFrame type resource from the Assets to the Sprite Frame attribute reference. The resource image can then be displayed through the Sprite component.

If this SpriteFrame resource is contained within an Atlas resource, then the Atlas attribute of the Sprite will be set up along with it. Later you can click the choose button next to the Atlas attribute to choose another SpriteFrame from this Atlas to assign to the Sprite.

Rendering mode

Currently, the Sprite component supports two rendering modes:


Continue on to read about Label component reference.