SpriteRenderer Constructor (SpriteSheet, Texture2D, Boolean, Boolean) |
Create the sprite renderer component.
Namespace:
GeonBit.ECS.Components.Graphics
Assembly:
GeonBit (in GeonBit.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax public SpriteRenderer(
SpriteSheet spritesheet,
Texture2D texture = null,
bool useSharedMaterial = true,
bool faceCamera = true
)
Parameters
- spritesheet
- Type: GeonBit.Core.GraphicsSpriteSheet
Spritesheet data. - texture (Optional)
- Type: Texture2D
Texture to use for this sprite with a default material. - useSharedMaterial (Optional)
- Type: SystemBoolean
If true, will use a shared material for all sprites using this texture.
This optimization reduce load/unload time and memory, but it means the material is shared with other sprites. - faceCamera (Optional)
- Type: SystemBoolean
If true, will always face camera. If false will use node's rotation.
See Also