# Sandbox.Sprite

Represents a sprite resource that can be static or animated. Sprites are rendererd using the SpriteRenderer component.

- Kind: class
- Namespace: `Sandbox`
- Assembly: `Sandbox.Engine`
- Inherits: [Sandbox.GameResource](/api/Sandbox.GameResource)
- Modifiers: sealed

## Constructors

- [`Sprite`](/api/Sandbox.Sprite/.ctor)

## Properties

- [`Animations`](/api/Sandbox.Sprite/Animations): A list of animations that can be played. Some animations can consist of multiple frames. If a sprite is static, it will only contain a single default animation.
- [`ResourceVersion`](/api/Sandbox.Sprite/ResourceVersion)

## Methods

- [`FromTexture`](/api/Sandbox.Sprite/FromTexture): Returns a sprite with a single frame animation using the provided texture.
- [`FromTextures`](/api/Sandbox.Sprite/FromTextures)
- [`GetAnimation`](/api/Sandbox.Sprite/GetAnimation): Get an animation by its index. Returns null if out of bounds.
- [`GetAnimationIndex`](/api/Sandbox.Sprite/GetAnimationIndex): Get the index of an animation by its name. Returns -1 if not found.
