SpriteRenderer Constructor (SpriteSheet, String, 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,
string texturePath = null,
bool useSharedMaterial = true,
bool faceCamera = true
)
Parameters
- spritesheet
- Type: GeonBit.Core.GraphicsSpriteSheet
Spritesheet data. - texturePath (Optional)
- Type: SystemString
Texture to use for this sprite with a new default material. - useSharedMaterial (Optional)
- Type: SystemBoolean
If true, will use a shared material for all sprites using this texture.
If true, will always face camera. If false will use node's rotation.
This optimization reduce load/unload time and memory, but it means the material is shared with other sprites. - faceCamera (Optional)
- Type: SystemBoolean
[Missing <param name="faceCamera"/> documentation for "M:GeonBit.ECS.Components.Graphics.SpriteRenderer.#ctor(GeonBit.Core.Graphics.SpriteSheet,System.String,System.Boolean,System.Boolean)"]
See Also