In Lenga, sprites are commonly used for characters, enemies, bullets, tiles, pickups, icons, particles, and other 2D visuals.
Sprite, Texture, and Image Asset
These words are related, but they do not always mean the same thing.
An image asset is the file in your project, such as a PNG.
A texture is the image data loaded by the engine.
A sprite is the 2D artwork you use from that image data.
For a simple single-image object, those ideas may feel almost identical. For a sprite sheet, the difference becomes more important because one image file can contain many sprites.
Sprites in a Scene
To show a sprite in a scene, you usually use a GameObject with a Sprite Renderer component.
The GameObject provides the scene object.
The Transform places it.
The Sprite Renderer draws the sprite.
That means changing the Transform moves the whole object, while changing the sprite changes what artwork the object displays.
Sprite Sheets
A sprite sheet is one image that contains multiple sprites.
Sprite sheets are useful for:
- animation frames
- tile sets
- character variations
- packed UI art
- effects frames
When you work with sprite sheets, import settings and slicing matter because the engine needs to know which rectangle inside the image represents each sprite or frame.
Sprites and UI
Sprites can appear in scene objects and UI, but the route is different.
A scene object usually displays a sprite through a Sprite Renderer.
A UI image displays artwork through an Image UIElement inside a Canvas.
The artwork may come from the same project asset, but the placement system is different: scene sprites use Transform, while UI uses RectTransform layout.