There are some concepts you rely on from the moment you open the Unity Editor. Use this page to refresh your memory as you work through tutorials and your first projects.
GameObjectsThe fundamental object in Unity scenes, which can represent characters, props, scenery, cameras, waypoints, and more. A GameObject’s functionality is defined by the Components attached to it. More info
See in Glossary represent everything in your game, including characters, props, and scenery. In the Unity Editor, all objects in a scene are GameObjects. In contrast, project assets are source files that you add to scenes. For example, C# scriptsA piece of code that allows you to create your own Components, trigger game events, modify Component properties over time and respond to user input in any way you like. More info
See in Glossary, textures, materials, 3D model filesA file containing a 3D data, which may include definitions for meshes, bones, animation, materials and textures. More info
See in Glossary, and prefabsAn asset type that allows you to store a GameObject complete with components and properties. The prefab acts as a template from which you can create new object instances in the scene. More info
See in Glossary.
GameObjects exist in 2D or 3D environments called scenesA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info
See in Glossary. You can think of a scene as a game level, but it might also represent a menu, the credits at the end of the game, or a cutscene.
The behavior of GameObjects is defined by blocks of functionality called components. You can attach multiple components to GameObjects. The following components are fundamental for 3D games:
Component | Impact on a GameObject |
---|---|
Transform | Determines the Position, Rotation, and Scale of each GameObject in the scene. Every GameObject has a Transform componentA Transform component determines the Position, Rotation, and Scale of each object in the scene. Every GameObject has a Transform. More info See in Glossary. |
Mesh Filter | Defines the shape of a 3D GameObject. |
Mesh Renderer | Applies textures and handles how the 3D GameObject looks under lighting examples. |
Cameras | Define GameObjects that capture and display the world to the player. |
Rigidbody | Allow GameObjects to interact with the Physics system, including gravity and collisionsA collision occurs when the physics engine detects that the colliders of two GameObjects make contact or overlap, when at least one has a Rigidbody component and is in motion. More info See in Glossary. Refer to the Physics section of this guide. |
Colliders | Defines the shape of a 3D GameObject for the purpose of physical collisions, which can be different from the 3D meshThe main graphics primitive of Unity. Meshes make up a large part of your 3D worlds. Unity supports triangulated or Quadrangulated polygon meshes. Nurbs, Nurms, Subdiv surfaces must be converted to polygons. More info See in Glossary’s visible shape. |
Use scripts to create complex game behavior, such as:
To add a script to a GameObject, add the Script component, and reference your own script in it.
Unity supports the C# programming language natively.
Models are 3D representations of objects. The majority of the visuals for 3D games consist of models, such as characters, interactive objects, and the world around the player.
You can use tools like ProBuilder to create models in the Unity Editor. However, these work best for prototyping, rather than for your final product.
To add more polished 3D assets to your final product, create 3D models, along with their materials and textures, in 3D modeling software, then import them into the Editor.
Import models into the Editor to use them in your project. The Editor uses the .fbx
format. You can also use other common native model formats (for example, .max
, .blend
, .mb
, .ma
); the Editor converts them into .fbx
when you import them.
A 3D mesh is the structural build of a 3D model. It’s made up of multiple polygon shapes. To add a 3D model to a GameObject, your GameObject needs two components:
MaterialsAn asset that defines how a surface should be rendered. More info
See in Glossary combine information about the visual appearance of a surface, such as texturesAn image used when rendering a GameObject, Sprite, or UI element. Textures are often applied to the surface of a mesh to give it visual detail. More info
See in Glossary, color tints, and shadersA program that runs on the GPU. More info
See in Glossary. Use materials to define how to render surfaces.
For material design, refer to the Unity Learn Tutorial.
Environment design is the process of creating the world the gameplay takes place in. You can design and build your environment in the Unity Editor, or you can design an environment outside of the Editor and import it.
To build an in-game environment, add GameObjects to the scene and position them to suit your preference and design. You can use ProBuilder to prototype the design and gameplay.
In addition to hand-placing your models in the scene, the Unity Editor includes a built-in set of TerrainThe landscape in your scene. A Terrain GameObject adds a large flat plane to your scene and you can use the Terrain’s Inspector window to create a detailed landscape. More info
See in Glossary features that allow you to add landscapes to your game. In the Editor, you can create multiple Terrain tiles, adjust the height or appearance of your landscape, and add trees or grass to it. Read more about Creating and Using Terrains.
Animations describe how objects change based on game states, player interaction, time, and so on. They also give characters their movement, create cutscenes, and change the environment.
There are two ways to add animations to your game:
For more information, refer to the Unity Learn animation topic.
When you import a model with animation clips, you can choose which of its clips to import. This means you can animate models in a third-party application, then access and edit the clips in the Editor.
For more information, refer to the Animation tab of the Model Import Settings window.
Use the Animation window to create and modify animation clips in the Editor.
To learn how animation works in the Editor, refer to Mecanim Animation system.
You can use the Animator windowThe window where the Animator Controller is visualized and edited. More info
See in Glossary to:
To control which animation clips play, you can:
Light your scenes to add depth and mood to your environments.
All built-in scene templates, except the Empty template, include a single Light GameObject. For most scenes, you’ll want to create additional Light GameObjects to create the desired lighting.
For more information, refer to:
To add background music and sound effects to your game, refer to Audio Overview. You’ll need to use third-party software to create your audio and import it into the Editor. Then, you can mix your sounds, place them in scenes, and create ambient sound.
Use Unity’s physics system to control how objects interact with each other and with their environment. For example, you can:
To learn how to use Unity’s physics system, you can refer to:
To apply the physics system to a GameObject, use the RigidbodyA component that allows a GameObject to be affected by simulated gravity and other forces. More info
See in Glossary and ColliderAn invisible shape that is used to handle physical collisions for an object. A collider doesn’t need to be exactly the same shape as the object’s mesh - a rough approximation is often more efficient and indistinguishable in gameplay. More info
See in Glossary components:
Component | Impact on a GameObject |
---|---|
Rigidbody | Allows your GameObject to be affected by the physics system, and react to things like gravity and collisions. |
Collider | Enable GameObjects to interact with other GameObjects in the scene. For example, GameObjects with a collider can move or be moved by another GameObject with a collider. |
Collider with a trigger | Call a function in code when two GameObjects intersect. |
To create interface elements, such as menus, gear lists, and information pop-ups, use UI Toolkit.