Components
An entity is just an ID and a name. Everything else it does comes from the components attached to it. Add components from the Properties panel in the editor, from a script with entity:Add<Name>(), or by writing them into a scene file - see Scene Files.
Core
| Component |
Scene element |
What it does |
| ID |
on <Entity> |
The entity's unique ID, which stays the same across saves. |
| Name |
on <Entity> |
The entity's display name. |
| Transform |
<Transform> |
Position, rotation and scale. |
| Hierarchy |
on <Entity> |
Links an entity to its parent and children. |
| Hidden |
<Hidden> |
Stops an entity, and everything under it, from being drawn. |
Rendering
| Component |
Scene element |
What it does |
| Camera |
<Camera> |
The point of view the scene is rendered from. |
| Sprite |
<Sprite> |
Draws a textured or plain coloured quad. |
| Animated Sprite |
<AnimatedSprite> |
Plays a named animation from a sprite sheet. |
| Circle Renderer |
<CircleRenderer> |
Draws a filled circle or a ring, with no texture needed. |
| Static Mesh |
<StaticMesh> |
Draws an imported 3D model. |
| Primitive |
<Primitive> |
Draws a generated 3D shape: cube, sphere, plane, cylinder, cone or torus. |
| Tilemap |
<Tilemap> |
A grid of tiles drawn from a tileset, with optional collision. |
| Text |
<Text> |
Draws a string, in the world or in in-game UI. |
| Point Light |
<PointLight> |
A light that shines in every direction from the entity's position. |
| Billboard |
<Billboard> |
Keeps an entity facing the camera. |
Physics 2D
| Component |
Scene element |
What it does |
| Rigid Body 2D |
<RigidBody2D> |
Makes an entity a 2D physics body that can be moved by gravity, forces and collisions. |
| Box Collider 2D |
<BoxCollider2D> |
A rectangular collision shape. |
| Circle Collider 2D |
<CircleCollider2D> |
A circular collision shape. |
| Capsule Collider 2D |
<CapsuleCollider2D> |
A pill-shaped collision shape, made from two circles and a box. |
| Polygon Collider 2D |
<PolygonCollider2D> |
A collision shape with any outline you like. |
| Weld Joint 2D |
<WeldJoint2D> |
Holds this entity's physics body fixed to its parent's body. |
Scripting & AI
| Component |
Scene element |
What it does |
| Lua Script |
<LuaScript> |
Runs a Lua script on the entity. |
| Behaviour Tree |
<BehaviourTree> |
Runs a behaviour tree on the entity, for AI decisions. |
| State Machine |
<StateMachine> |
Placeholder for state machine AI. |
Audio
| Component |
Scene element |
What it does |
| Audio Source |
<AudioSource> |
Plays an audio clip from the entity's position. |
| Audio Listener |
<AudioListener> |
The point that sound is heard from, usually the camera or the player. |
In-game UI
| Component |
Scene element |
What it does |
| Canvas |
<Canvas> |
The root of a piece of in-game UI. |
| Widget |
<Widget> |
Position and size of a UI element, anchored to its parent. |
| Button |
<Button> |
A clickable UI element, with a different look for each state. |
| Stack Layout |
<StackLayout> |
Arranges child widgets in a row or a column. |
| Grid Layout |
<GridLayout> |
Arranges child widgets in a grid with a fixed number of columns. |
| Scroll Box |
<ScrollBox> |
Scrolls a single child widget that's bigger than the box. |