Documentation

Unity Spark

Open Unity Spark

Unity Spark

Add and manage components

Add, enable, disable, reorder, copy, and remove components on an object in the Unity Spark Inspector window.
Read time 2 minutesLast updated 3 hours ago

Use the Inspector window to add components to an object and change, reorder, copy, or remove them. For a description of the Inspector window, refer to Inspector window reference.

Add a component

Add several components to an object to give it more functionality and behaviors.
To add components to your objects:
  1. Select the object. The object's Inspector window opens.
  2. Select Add Component.
  3. Select a category.
  4. Select a component. You can also enter a component name in Search components.
The categories include Physics, Physics 2D, Rendering, Rendering 2D, Audio & Video, Particles, Animation, Navigation, UI, Layout, and Scripts. The menu shows only the categories that apply to the selected object, for example, UI components for UI objects.
A component that the object already has, and can have only once, is grayed out with Only one per object.
To add a script, you can also drag it from the Project window onto the object's row in the Hierarchy window.

Enable or disable a component

Most components have a checkbox in their header. To disable a component without removing it, disable it in its header. The component dims to show that it's inactive.
To disable an entire object, disable Active next to its name at the top of the Inspector window. Its row dims in the Hierarchy window.

Reorder, copy, or remove a component

In the component's header, open the menu (⋮). The menu contains the following options.

Option

Description

Copy ComponentCopies the component and its values.
Paste Component as NewAdds the copied component to this object.
Paste Component ValuesPastes the values of the copied component onto this matching component.
Move Up and Move DownChanges the component's position in the list.
Remove ComponentRemoves the component. Select Remove to confirm.
You can also drag a component by its header to reorder it. You can't move or remove the Transform component.
You can't paste or reorder while your game is playing.

Ask the assistant to set up components

The AI assistant can add and set up components for you. Describe the result you want, for example,
Make the crate fall and bounce when it lands.

Additional resources