Use sprites
To add a sprite to a scene, add a sprite component to an entity. Afterwards, you can control the sprite with a script.
- In the Scene Editor, select the entity you want to add a sprite to.
Tip
To create an entity, right-click the scene or Entity Tree and select Empty entity.
Game Studio adds a Sprite component to the entity.
- From the Asset View, drag the sprite sheet to the Source field in the Sprite component:
Then choose a sprite sheet:
Game Studio adds the sprite to the entity.
You can use scripts to render sprites at runtime. To do this, attach the script to an entity with a sprite component.
For information about how to add scripts to entities, see .
Code sample
This script displays a sprite that advances to the next sprite in the index every second. After it reaches the end of the sprite index, it loops.