Skip to main content

Sprite

The sprite component renders and animates sprite assets in the scene.

There are two types of sprites: Simple and Animated.

Simple Sprite

The simple sprite component displays a single frame from an atlas.

Simple Sprite

Simple Sprite Component Properties

PropertyDescription
TypeSimple or Animated.
SpriteThe sprite asset to display.
FrameThe frame index of the sprite to display.
ColorThe color to apply as a tint to the sprite.
OpacityThe transparency of the sprite.
Flip XFlips the rendered sprite horizontally.
Flip YFlips the rendered sprite vertically.
LayersThe layers on which the sprite will be rendered.
Draw OrderThe order in which this sprite is rendered. Lower numbers are rendered first.

Animated Sprite

The animated sprite component has multiple sprite animation clips connected that can play different sprite assets.

Animated Sprite

Animated Sprite Component Properties

PropertyDescription
TypeSimple or Animated.
FrameThe frame index of the sprite to display.
ColorThe color to apply as a tint to the sprite.
OpacityThe transparency of the sprite.
Flip XFlips the rendered sprite horizontally.
Flip YFlips the rendered sprite vertically.
SpeedA multiplier applied to the speed at which this sprite component's sprite animation clips are animated.
LayersThe layers on which the sprite will be rendered.
Draw OrderThe order in which this sprite is rendered. Lower numbers are rendered first.
Auto PlayThe name of the sprite animation clip to play when the sprite is activated.

Sprite Animation Clip Properties

PropertyDescription
NameThe name of the sprite animation clip. Used to reference individual clips.
LoopIf true, the animation clip repeats from the beginning when it reaches the end.
FPSThe speed at which the clip plays in frames per second.
SpriteThe sprite asset used to play this clip.

Scripting Interface

You can control the sprite component's properties using a script component. The sprite component's scripting interface is here.