API ReferenceSandbox
public sealed class Sandbox.Sprite : Sandbox.GameResource
Represents a sprite resource that can be static or animated. Sprites are rendererd using the SpriteRenderer component.
Related Guides
Broader workflow and conceptual references connected to this API.
Constructors
Showing 1 constructors
public Sprite()
No results match this filter.
Methods
Showing 5 methods
public static Sandbox.Sprite FromTexture(Sandbox.Texture texture)
Returns a sprite with a single frame animation using the provided texture.
Parameters
texture: The texture to be used
public static Sandbox.Sprite FromTextures(System.Collections.Generic.IEnumerable`1<Sandbox.Texture> textures, float frameRate = 15)
Parameters
frameRate: Default: 15
public int GetAnimationIndex(string name)
Get the index of an animation by its name. Returns -1 if not found.
Parameters
name: The name of the animation
No results match this filter.
Properties
Showing 1 properties
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | Sandbox |
| Type | class |
| Assembly | Sandbox.Engine |
| Doc ID | T:Sandbox.Sprite |