new UISprite()
UISprite is a special Sprite class wihch is used to render Images on UI elements. This is a UI component, so it should be added to an entity with a UITransform component.
| Name | Type | Default | Description | 
|---|---|---|---|
path | string | "" | The path to the image to display.  | 
- Source
 
Example
// Create a new entity with a UITransform component and a UISprite component.
let entity = new Entity();
entity.AddComponent(new UITransform());
entity.AddComponent(new UISprite("assets/sprites/texture.png"));Extends
Members
blendMode
Blend mode of the object
- Inherited From
 
filter
The filter applied to the object
- Inherited From
 
(readonly) properties
The entity that this component is attached to.
- Inherited From
 - Source