Components reference
Find every component in the Unity Spark Add Component menu, what each one does, and how the components unique to Unity Spark differ from Unity.
Read time 8 minutesLast updated 3 hours ago
Use this reference to find the component you need in the Add Component menu of the Inspector window. For how to add a component, refer to Add and manage components.
Most components work like the Unity components with the same names. For their properties, refer to the Unity Manual. This page describes the properties of the components that are unique to Unity Spark, and notes where a component differs from Unity.
Add Component menu
The Add Component menu lists components by their type names, for example, BoxCollider. When you search, you can include spaces, so also finds BoxCollider.
box colliderThe menu shows only the components that fit the selected object. UI components appear only on UI objects, such as a button or an image, and other components appear only on other objects. A component that an object can have only once appears unavailable, with Only one per object, after you add it.
Some parts of your game aren't components that you add from this menu:
- Canvas, Text, and input fields come with the UI objects that you add from the Hierarchy window.
- The sky, fog, shadows, and post-processing effects are scene settings. Refer to Introduction to scene environments.
- The MeshFilter component is part of the MeshRenderer component, so the menu doesn't list it.
- Simple particle effects come from the Particle System object in the Hierarchy window.
Physics
The following table describes the physics components.
Component | Description |
|---|---|
| Rigidbody | Moves the object with physics, so gravity pulls it and other objects can push it. The settings that override the center of mass and inertia tensor don't appear in the Inspector window. |
| ArticulationBody | A physics body for jointed chains, such as a robot arm. |
| BoxCollider | An invisible box that physics uses to tell when the object touches something. |
| SphereCollider | An invisible sphere that physics uses to tell when the object touches something. |
| CapsuleCollider | An invisible capsule shape, often used for characters. |
| MeshCollider | An invisible shape that matches the object's 3D model exactly. |
| HingeJoint | Joins two bodies around a hinge, like a door. |
| FixedJoint | Locks two bodies together. |
| SpringJoint | Connects two bodies with a spring. |
| CharacterJoint | A ball-and-socket joint with limits, used for ragdoll limbs. |
| ConfigurableJoint | A joint you can fully customize. |
| WheelCollider | A vehicle wheel with suspension, motor, and brakes. |
| CharacterController | Moves a character with collisions, slopes, and steps, without a Rigidbody. |
| Ragdoll | Unique to Unity Spark. Turns a humanoid character into a physics ragdoll, for example, when the character collapses. Refer to Ragdoll. |
Physics 2D
For how to use 2D physics, refer to Add 2D physics to objects. The following table describes the 2D physics components.
Component | Description |
|---|---|
| Rigidbody2D | Moves a 2D object with physics. |
| BoxCollider2D, CircleCollider2D, CapsuleCollider2D | 2D collision shapes. |
| PolygonCollider2D | A 2D collision shape that fits the outline of the object. |
| EdgeCollider2D | A 2D collision line, or a series of lines. |
| CompositeCollider2D | Merges several 2D colliders into one shape. |
| TilemapCollider2D | Adds collisions to the tiles of a tilemap. |
| HingeJoint2D, SpringJoint2D, FixedJoint2D, SliderJoint2D, WheelJoint2D, DistanceJoint2D, FrictionJoint2D, RelativeJoint2D | Connect two 2D bodies with a hinge, spring, fixed, sliding, wheel, distance, friction, or relative-offset joint. |
| TargetJoint2D | Pulls a 2D body toward a target point. |
| AreaEffector2D | Pushes bodies inside an area. |
| PointEffector2D | Attracts or pushes bodies away from a point. |
| SurfaceEffector2D | Moves bodies along a surface, like a conveyor belt. |
| BuoyancyEffector2D | Makes bodies float in water. |
| PlatformEffector2D | Makes one-way platforms that you can jump through from underneath. |
Rendering
The following table describes the rendering components.
Component | Description |
|---|---|
| MeshRenderer | Draws the object's mesh with its materials. In Unity Spark, it also holds the mesh, so there's no separate MeshFilter. |
| SkinnedMeshRenderer | Draws a mesh that a skeleton deforms, for animated characters. |
| InstancedMeshRenderer | Unique to Unity Spark. Draws many copies of the object's mesh, such as grass, rocks, or crowds, which an Instancing shader graph places. Refer to InstancedMeshRenderer. |
| VisualEffect | Unique to Unity Spark. Runs a particle effect from a Visual Effect shader graph. Refer to VisualEffect. |
| LineRenderer | Draws a line through a list of points. |
| TrailRenderer | Draws a trail behind a moving object. |
| Camera | Renders the scene from a viewpoint. |
| Light | A 3D light: directional, point, spot, or area. |
| CanvasRenderer | Draws a UI element. UI objects only. |
Rendering 2D
The following table describes the 2D rendering components.
Component | Description |
|---|---|
| SpriteRenderer | Draws a 2D sprite. Refer to SpriteRenderer properties. |
| Light2D | A light for 2D sprites. Unity Spark has the Spot, Sprite, and Global types. |
| PixelPerfectCamera | Keeps pixel art crisp at any screen size. |
| WorldText | Unique to Unity Spark. Text placed in the game world, not on a UI canvas. Refer to WorldText. |
| TilemapRenderer | Draws the tiles of a tilemap. |
| ShadowCaster2D | Makes an object cast a shadow from a Light2D. |
| SortingGroup | Sorts a group of renderers together. |
| Grid | The cell layout of a tilemap. |
| Tilemap | Holds the tiles you paint. Refer to Paint levels with tilemaps. |
Audio and Video
The following table describes the audio and video components.
Component | Description |
|---|---|
| AudioSource | Plays a sound clip, in 2D or in 3D space. |
| AudioListener | Hears the sounds in the scene. Usually on the camera. |
Particles
The following table describes the particle components.
Component | Description |
|---|---|
| ParticleSystem | A particle effect, such as fire, sparks, or smoke, made up of modules. |
Animation
The following table describes the animation components.
Component | Description |
|---|---|
| Animator2D | Unique to Unity Spark. Plays a 2D animation controller, such as a sprite animation. Refer to Animator2D. |
| CharacterAnimator | Unique to Unity Spark. Animates a humanoid character with an animation controller, clips from other models, and root motion. Refer to CharacterAnimator. |
| ModelAnimator | Unique to Unity Spark. Plays the animation clips that come with a model. Refer to ModelAnimator. |
Navigation
The following table describes the navigation components.
Component | Description |
|---|---|
| NavMeshSurface | Bakes the area that characters can walk on. |
| NavMeshAgent | Moves a character along the walkable area. In Unity Spark, it has Speed, Angular Speed, Acceleration, Stopping Distance, Auto Braking, Radius, and Height, and no agent type. |
| NavMeshLink | Connects separate walkable areas, for example, for a jump. It has no agent type. |
| NavMeshObstacle | A moving obstacle that characters avoid. |
UI and Layout
The UI and Layout sections of the menu hold the components for your game's interface, such as Button, Slider, and HorizontalLayoutGroup. They appear only on UI objects. For what each one does, refer to UI elements and Group and fit elements.
Scripts
The Scripts section at the end of the menu lists components that don't belong to another category, such as AbilitySystem, Shape, Icon, and StyleRole.
Properties of components unique to Unity Spark
The following sections describe the properties of the components that are unique to Unity Spark.
Ragdoll
Add a Ragdoll component to a humanoid character that has a CharacterAnimator component. When the game runs, the Ragdoll component creates a physics body and joint for each bone.
The Ragdoll component has the following properties.
Property | Description |
|---|---|
| Total Mass | Sets the mass of the whole ragdoll, spread across the bones. |
| Solver Iterations | Sets how stiff and steady the joints are. Higher values are steadier. |
| Solver Velocity Iterations | Sets how much the joints wobble after the ragdoll collapses. Higher values wobble less. |
InstancedMeshRenderer
The InstancedMeshRenderer component has the following properties.
Property | Description |
|---|---|
| Count | Sets how many copies the graph places. |
| Update | Sets the update mode: Every Frame or Once. |
| Graph | Sets the Instancing shader graph that places the copies. |
| Graph Properties | Sets the values that the graph exposes. |
The object's material must use a Lit or Unlit shader graph with instancing enabled. For more information, refer to Choose a shader graph kind.
VisualEffect
The VisualEffect component has the following properties.
Property | Description |
|---|---|
| Graph | Sets the Visual Effect or Instancing shader graph to run. |
| Capacity | Sets the maximum number of particles. Set it to |
| Dispatch Once | Determines how often the graph runs. When enabled, the graph runs once when the game starts. When disabled, it runs every frame. |
| Seed | Sets the random seed. Set it to |
| Graph Properties | Sets the values that the graph exposes. |
With a Visual Effect graph, the object's material must use a shader graph that reads particle data. With an Instancing graph, the material must use a shader graph with instancing enabled that doesn't read particle data. The built-in particle shaders can't draw a VisualEffect.
WorldText
The WorldText component has the following properties.
Property | Description |
|---|---|
| Font, Style, Text | Sets the text and its appearance. |
| Horizontal Align, Vertical Align | Sets how the text lines up. |
| Size | Sets the text size. When Auto-Size is enabled, set Min Size and Max Size instead. |
| Auto-Size | Fits the text to its area. |
| Color | Sets the text color. |
| Rich Text | Allows formatting tags in the text. |
| Wrapping, Overflow | Determines what happens when the text doesn't fit. |
| Sorting Layer, Order in Layer | Determines which sprites the text draws over. |
Animator2D
The Animator2D component has the following properties.
Property | Description |
|---|---|
| Controller | Sets the animation controller to play. |
| Play On Awake | Starts the default state when the game starts. |
| Speed | Sets the playback speed. Set it to |
While the game runs, the component also shows the current state.
CharacterAnimator
The CharacterAnimator component has the following properties.
Property | Description |
|---|---|
| Play On Awake | Starts animating when the game starts. |
| Apply Root Motion | Lets the animation move the character. |
| Humanoid Retarget | Plays humanoid clips from other characters on this skeleton. |
| Controller | Sets the animation controller to use. |
| Clip Bindings | Sets which file and take each clip slot in the controller plays. Appears when the controller has clip slots. |
| Clip Sources | Lists other models whose clips this character can use. |
| Clip Settings | Defines settings for each clip. |
ModelAnimator
The ModelAnimator component has the following properties.
Property | Description |
|---|---|
| Play On Awake | Plays the model's clips when the game starts. |
| Clips | Lists the clips that come with the model. Read-only. |