Components
Learn About Unity's Components
What Are Components
As previously discussed, components are essentially all the pieces that make up an object! Every object in the game contains at least a transform component. The transform component holds data such as the object’s position, rotation, and scale. For example, the Main Camera
contains both a Camera
component and an Audio Listener
. Typically the components are pretty self-explanatory. An example of some components that a play may have would be a Collider
that detects an in-game collision, a script that holds the code that controls the player, and possibly a component that controls physics.
Add A Component
To create or add a component go to the GameObject you want to add it to and look at the inspector. Here there is an Add Component
button. You can either navigate the folders of components organized by subject or look for a specific component using the search bar.