build Constructors 1

data_object Properties 26

Additive
bool
Whether or not the sprite should be rendered additively.
AlphaCutoff
float
Alpha threshold for discarding pixels. Pixels with alpha below this value will be discarded. Only used when Opaque is true. Range: 0.0 (transparent) to 1.0 (opaque). Default is 0.5.
Billboard
BillboardMode
Alignment mode for the sprite's billboard behavior.
Color
Color
The color of the sprite. This is multiplied with the texture color.
ComponentVersion
int
CurrentAnimation
Animation
The animation that is currently being played. Returns null if no sprite is set or the sprite has no animations.
CurrentFrameIndex
int
The index of the current frame being displayed. This will change over time if the sprite is animated, and can be set to go to a specific frame even during playback.
DepthFeather
float
Amount of feathering applied to the depth, softening its intersection with geometry.
FlipHorizontal
bool
Whether or not the sprite should be flipped horizontally.
FlipVertical
bool
Whether or not the sprite should be flipped vertically.
FogStrength
float
The strength of the fog effect applied to the sprite. This determines how much the sprite blends with any fog in the scene.
IsAnimated
bool
Whether or not the sprite is animated. This is true if the sprite has more than one animation.
IsSorted
bool
Whether or not the sprite should be sorted by depth. If the sprite is opaque, this can be turned off for a performance boost if not needed.
Lighting
bool
Whether or not the sprite should be lit by the scene's lighting system. Otherwise it will be unlit/fullbright.
OnAnimationEnd
Action`1
This action is invoked when an animation finishes playing or has looped. The string parameter is the name of the animation.
OnAnimationStart
Action`1
This action is invoked when an animation starts playing. The string parameter is the name of the animation that started.
OnBroadcastMessage
Action`1
This action is invoked when advancing to a new frame that has broadcast messages. The string parameter is the message being broadcast.
Opaque
bool
Whether or not the sprite should be rendered opaque. If true, any semi-transparent pixels will be dithered.
OverlayColor
Color
PlaybackSpeed
float
The playback speed of the animation. 0 is paused, and negative values will play the animation in reverse.
Shadows
bool
Whether or not the sprite should cast shadows.
Size
Vector2
The width and height of the sprite in world units.
Sprite
Sprite
The sprite resource to render. This can be completely static or contain animation(s).
StartingAnimationName
string
The animation that this sprite should start playing when the scene starts.
Texture
Texture
The texture of the current frame being displayed. Returns a transparent texture when no valid frame is available.
TextureFilter
FilterMode
The texture filtering mode used when rendering the sprite. For pixelated sprites, use Sandbox.UI.ImageRendering.Point.

Inheritance

people
Log in to reply
You can't reply if you're not logged in. That would be crazy.