To create a 3D game, set up your Unity project and then familiarize yourself with the relevant concepts in the following order:
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 are fundamental objects in Unity that represent characters, props, scenery, and more. Every object in your game is a GameObject.
GameObjects live in 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 something else entirely.
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:
Unity allows you to create your own Components using 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. Scripts let you trigger game events, modify Component properties over time and respond to user input.
Unity supports the C# programming language natively.
Here some examples of how you can use scripts in your game:
For details on how to use scripts in Unity, see Scripting Overview. To learn the fundamentals of scripting, follow the Unity Learn Beginner Scripting course. For more in-depth guidance, see the example projects Create with Code and Creator Kit: Beginner Code.
Models are 3D representations of objects. The majority of the visuals for 3D games consist of models, such as characters, interactable objects, and the world around the player.
You can use tools like Probuilder to create models in Unity. However, these work best for prototyping, rather than for the final product.
To add more polished 3D assets to your final product, create 3D Models, Materials and Textures in 3D modeling software and then import them into Unity.
Unity uses the .fbx model format. You can also use other common native model formats (for example, .max, .blend, .mb, .ma), and Unity converts them into .fbx once they are imported.
Import models into Unity to use them in your project.
A 3D mesh is the structural build of a 3D model. It is made up of multiple polygon shapes. To add a 3D model to a GameObject, add a Mesh Filter to the GameObject. The Mesh Renderer component renders meshes in your scene; to ensure models appear in your game, add a Mesh Renderer to any GameObject that has a Mesh Filter component.
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.
See the Learn Tutorial on Material Design.
Environment design is the process of creating an environment for gameplay to take place in. You might design and build your environment at the same time in the Unity Editor, or you might design an environment outside of Unity and then build it in Unity.
To build an in-game environment, you add GameObjects to the scene and position them to suit your preference and design.
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.
You can import animations made in other programs, or animate your assets directly in the Editor. For more information on 3D animation, see the Unity Learn Course Introduction to 3D Animation Systems.
Unity can import animation clips when you import a model with animation. This means you can animate models in another program and then access and manipulate the clips in Unity.
Use the Animation window to create and modify Animation Clips directly inside Unity.
Use KeyframeA frame that marks the start or end point of a transition in an animation. Frames in between the keyframes are called inbetweens.
See in Glossary animation to add simple animations to a GameObject within your scene, such as changing its position, size, or rotation.
To control which Animation ClipsAnimation data that can be used for animated characters or simple animations. It is a simple “unit” piece of motion, such as (one specific instance of) “Idle”, “Walk” or “Run”. More info
See in Glossary play, you can call them directly in a script with the Animator Class, or create and modify the Animator ControllerControls animation through Animation Layers with Animation State Machines and Animation Blend Trees, controlled by Animation Parameters. The same Animator Controller can be referenced by multiple models with Animator components. More info
See in Glossary in the Animator windowThe window where the Animator Controller is visualized and edited. More info
See in Glossary.
You can use the Animator window to:
Light your Scenes to add depth and mood to your environments and to help the player experience the game world you’ve created. To set up lighting:
See the Unity Learn Lighting in URP tutorial.
You can add background music and sound effects to your game in Unity; see Audio Overview. Use third-party software to create your audio and import it into Unity with the recommended settings.
Use Unity’s physics engineA system that simulates aspects of physical systems so that objects can accelerate correctly and be affected by collisions, gravity and other forces. More info
See in Glossary to control how GameObjects interact. You can use this to replicate forces such as gravity and mechanics, which define how GameObjects behave on collision in the real world. You can also configure the physics settings to create custom physics to fit the design of your game, which might not be an accurate simulation of the real world.
To learn how to use Unity’s physics engine, see the Unity Learn Physics tutorial. See the Physics section of the User Manual for more information.
To set up Physics for your GameObjects:
If you want to add a menu or help to your game, you need to set up a user interface. To set up a user interface, use Unity UI.