new Panel()#
A flat color rectangle that can be used to display UI elements. This is a UI component, so it should be added to an entity with a UITransform component.
Name | Type | Default | Description |
---|---|---|---|
color | Color | Color.white | The color of the panel. |
- Source
Example
// Create a new entity with a UITransform component and a Panel component. let entity = new Entity(); entity.AddComponent(new UITransform()); entity.AddComponent(new Panel(Color.white));
Extends#
Members#
blendMode#
Blend mode of the object
- Inherited From
color :Color#
The color of the panel.
Type:
- Source
filter#
The filter applied to the object
- Inherited From
(readonly) properties#
The entity that this component is attached to.
- Inherited From
- Source