Skip to main content

Built-in components

An entity on its own is only a name and a place in the hierarchy. Components give it everything else: a sprite to draw, a collider to bump into, a light to shine. This page lists every component that comes with Talesmith, grouped as in the Add component list, with what each one does and its main fields and defaults.

Add components with Add component at the bottom of the Inspector, or from the Component menu. To use components from code, see Entities and components in the scripting section.

Core​

Transform​

Position, rotation and scale. Every entity has one, and it cannot be removed. For a child entity, the values are relative to its parent.

FieldDefault
Position0, 0In world units. One unit is one pixel at 100% zoom. Y points down.
Rotation0In degrees.
Scale1, 1

Tags​

Labels for finding and grouping entities from scripts, such as enemy or pickup. You edit them with the + Tag chip in the Inspector's header rather than as a section.

Rendering​

Sprite​

Draws a texture, or one sprite of a texture that is sliced into several. See Sprites and the sprite editor.

FieldDefault
TextureThe image to draw
SpriteOne of the texture's sprites, or the whole texture
TintwhiteMultiplied with the image's colors
Layer300 (Entities)The render layer. Lower layers are drawn first, behind higher ones.
Flip X, Flip YoffMirror the image
Sort By YoffDraws sprites lower on screen in front of those above them, for top-down games
Visibleon
Source, Size, OriginAutoThe part of the texture to draw, the size in world units and the pivot from 0 to 1. They follow the chosen sprite until you set them.

Sprite Animator​

Plays one of a texture's animations on the entity's Sprite. Animations are made in the sprite editor.

FieldDefault
Texture, AnimationThe texture and the name of its animation
Speed1Playback speed, from 0 to 10
Playingon
Play On StartonPlays as soon as the scene starts

Camera​

Shows the scene. When several cameras are active, the one with the highest Priority draws. The viewport draws its frame as a gizmo.

FieldDefault
Priority0
Activeon
Follow targetnoneAn entity to follow, such as the player
Follow Sharpness8How quickly it catches up; 0 snaps at once
BoundsunsetKeeps the visible area inside a rectangle of the world
Min Zoom, Max Zoom0.05, 16
Zoom12 shows everything twice as large
Pixel SnapoffRounds the view to whole device pixels at the final scale, which keeps pixel art from shimmering

Tile Map Renderer​

Shows a tile map and spawns its objects as child entities. See Maps and grids.

FieldDefault
MapThe .hexy file
Render Layer100 (Terrain)The render layer of the map's first tile layer. Each further tile layer is drawn one layer higher.

Physics​

Physics runs in play mode and in the game. See Physics in the scripting section for how bodies behave.

Collider 2D​

A solid shape for collisions, or a trigger area that reports what enters it. Without a Rigidbody 2D, the collider is static: things bump into it, but nothing moves it.

FieldDefault
ShapeBoxBox, Circle, Capsule or Polygon
Size32, 32Width and height of a box or capsule
Radius16Of a circle
PointsThe outline of a polygon, in order
Offset, Rotation0, 0, 0The shape's place relative to the entity
Is TriggeroffReports overlaps to scripts instead of blocking
One WayoffBlocks only from above, like a platform you can jump through from below
Friction0.4
Restitution0Bounciness: 0 stops dead, 1 bounces back at full speed
Density1Used when a rigid body computes its mass
Layer, Collision MaskDefault, EverythingThe collision layer, and the layers it collides with. Layer names come from Project Settings › Physics.

Rigidbody 2D​

Moves the entity with gravity, forces and collisions.

FieldDefault
TypeDynamicDynamic moves with the simulation. Kinematic moves only by its velocity, pushes dynamic bodies and is never pushed, for moving platforms. Static never moves.
Auto Mass, Massoff, 1A fixed mass, or one computed from the colliders' area and density
Gravity Scale10 floats
Linear Drag, Angular Drag0, 0.05
Fixed RotationoffKeeps the body upright
Velocity, Angular Velocity0The starting velocity
InterpolationNoneInterpolate draws the body smoothly between physics steps on fast displays
Collision DetectionDiscreteContinuous for fast bodies such as bullets
Can SleeponLets a resting body stop simulating until something touches it

Character Controller 2D​

Moves the entity with its Collider 2D by sliding along floors and walls, for platformer and top-down characters. A script moves it each physics step; Your first game shows how.

FieldDefault
Slope Limit50°The steepest slope the character can walk up
Step Offset0The highest step it climbs without jumping
Skin Width0.5The gap kept between the character and what it touches
Ground Snap Distance4How far it is pulled down to stay on the ground walking down slopes
Up0, -1Which way is up, deciding what is ground, wall and ceiling
InterpolateoffDraws the character smoothly between physics steps

Tile Map Collider 2D​

Collision settings for the tile map on the same entity. A map collides through its collision layers without this component; add it to change the defaults.

FieldDefault
EnabledonTurns the map's collision off
Friction, Restitution0.4, 0
Layer, Collision MaskDefault, Everything

Lighting​

See Lighting for how lights, shadows and glowing sprites work together.

Light 2D​

A point, spot or directional light, with optional soft shadows.

FieldDefault
TypePointPoint shines in every direction, Spot in a cone, Directional everywhere from one direction, like the sun
BlendAdditiveAdditive adds light; Mix replaces the light underneath; Multiply darkens or tints it
Color, Intensitywhite, 1Intensity from 0 to 8
Radius, Inner Radius, Falloff256, 0, 1.6How far it reaches, the part at full strength, and how quickly it fades
Spot Angle, Spot Inner Angle60°, 30°The cone of a spot light
CookieAn image the light shines through
Casts ShadowsoffShadows from shadow casters and collision layers
Shadow Strength, Shadow Softness, Shadow Length1, 0.4, 0
Shadow LayersEverythingThe caster layers that block this light
AnimationNoneFlicker or Pulse, with Animation Speed and Animation Amount

Shadow Caster 2D​

A box, circle or polygon that blocks shadow-casting lights.

FieldDefault
Shape, Size, Radius, Points, OffsetBox, 32, 32
Self ShadowsoffDarkens the caster itself; otherwise its shape stays lit, even in other casters' shadows, and its shadow starts behind it
Layer0The caster layer, for lights that ignore some layers

Emissive​

Keeps the entity's sprite bright in the dark, for windows, lava and glowing eyes.

FieldDefault
Color, Intensitywhite, 11 shows the sprite at full brightness in complete darkness; 2 brightens it up to twice

Effects​

Particle Emitter​

Emits particles such as fire, smoke, sparks, rain and magic. Edit it in the Particles panel, which shows a live preview; the Inspector shows the same settings as fields.

FieldDefault
PresetnoneA .tparticles preset to play instead of the settings below
SettingsPlayback (duration, looping, prewarm, play on start, simulation space, maximum particles) and the modules

Audio​

See Audio for importing sounds.

Audio Source​

Plays a sound or music track, optionally placed in the world.

FieldDefault
ClipA sound, loaded into memory
MusicA music track, streamed; plays instead of the clip
Volume, Pitch1, 1Pitch from 0.1 to 3; music ignores it
Loopoff
Play On Starton
Busfrom the soundThe mixer bus: Effects, Music, Voice or Interface
SpatialoffFades the sound with distance from the listener and pans it left or right
Min Distance, Max Distance128, 1024Full volume within the first, silent beyond the second

Audio Listener​

Hears spatial sounds from this entity's position, such as the player. Without one, the active camera listens. It has no fields.

Scripting​

Scripts​

Your C# scripts. They are not listed under a category: they appear under Scripts at the bottom of the Add component list, each with its own section in the Inspector. See Your first script.

Components from plugins and scripts​

Plugins and scripts can define components of their own. They appear in the Add component list and the Component menu like the built-in ones, under the category they choose, and their fields get the same editors. See Systems and components.