Struct Sprite2DRenderer
A component for basic 2D sprite rendering. Specifies an Sprite2D to draw and rendering modifiers, such as a color tint.
Namespace: Unity.Tiny.Core2D
Syntax
[IdAlias("1c504a8a7963db0d32e89b527b90e057")]
public struct Sprite2DRenderer : IComponentData
Fields
blending
Blend op for rendering the sprite. The default and regular mode is Alpha.
Declaration
public BlendOp blending
Field Value
Type | Description |
---|---|
BlendOp |
color
A color tint to apply to the sprite image. For normal rendering, this should be opaque white (1, 1, 1, 1).
Declaration
public Color color
Field Value
Type | Description |
---|---|
Color |
sprite
The Entity on which to look for a Sprite2D component to describe the sprite to render. If null, the Sprite2D is looked for on the same entity as the Sprite2DRenderer .
Declaration
[EntityWithComponents(new Type[]{typeof(Sprite2D)})]
public Entity sprite
Field Value
Type | Description |
---|---|
Entity |
Properties
Default
Declaration
public static Sprite2DRenderer Default { get; }
Property Value
Type | Description |
---|---|
Sprite2DRenderer |