SlideShare une entreprise Scribd logo
1  sur  75
Summary
In this learning project, you will be introduced to some of the essential tasks of an artist, game developer, or
other creator of interactive 3D experiences. You’ll explore the 3D capabilities and features of Unity, starting
with creating and manipulating 3D objects. You will learn about components, which give you control over the
ways objects look and behave. You will control lighting effects and experiment with Materials, which give 3D
objects a realistic appearance.
Project Objective
By the end of this learning project you will be able to:
● Create a new 3D project.
● Create 3D objects in the Unity Editor.
● Move, scale, and rotate objects in 3D space.
● Control the properties and behaviors of 3D objects using components.
● Create and apply a Material to a 3D object.
● Adjust the Directional Light in a 3D Scene.
● Find and import 3D assets from the Unity Asset Store.
● Publish a 3D project.
Summary
In this tutorial, you’ll begin working in the Unity Editor with more independence than you might have experienced
with the Microgames. Using a new Unity project and 3D Scene you create from scratch, you will work with
GameObjects and explore the various ways you can manipulate them in the Unity Editor. In this tutorial, you will:
● Create new 3D GameObjects.
● Select 3D objects in both the Hierarchy and Inspector windows of the Unity Editor.
● Move, rotate, and scale 3D objects using numerical values using the Transform Component in the Inspector
window.
● Move, rotate, and scale 3D objects in the Scene view using the Unity transform tools.
● Link GameObjects in parent-child relationships using the Hierarchy window to create complex
GameObjects.
● Identify the relationship between the properties displayed in the Inspector and the display of GameObjects in
the Scene.
1.Overview
In this tutorial, you’ll apply what you have learned about the Unity Editor as you create and manipulate GameObjects in a Scene.
You’ll build more fundamental skills as you learn how to use the Hierarchy and Inspector windows to organize and configure your
GameObjects.
2.Before you begin
Get familiar with the Editor controls
In this tutorial, you’ll begin using the techniques you learned in a Microgame and in the previous Unity Essentials mission. As we go
through the next learning projects, we assume that you can manipulate GameObjects and navigate in 3D space.
To review, see Explore the Unity Editor for basic techniques, tips, and tricks.
Try a Microgame
If you are new to Unity and you haven’t already taken the tutorials in one of the Microgames available in the Unity Hub, we highly
recommend them — especially the LEGO® Microgame! Any of these Microgames will give you a good introduction to the Unity
Editor. Note: If you completed the LEGO® Microgame, you used some custom functionality that recreates the experience of using
physical LEGO® bricks inside the Unity Editor. Here, you will not see the special LEGO enhancements — you’ll be using the
uncustomized Unity Editor.
3.Create a new 3D project and Scene
Important: If you have already created a Unity project named “Essentials 3D project” in a previous mission, open that project from
the Unity Hub and skip this step.
Follow these steps if you need to create a new Unity project for this tutorial:
1. Open the Unity Hub.
2. Create a new Unity project using the 3D Template. Name this project “Essentials 3D project.”
Note: You might see a prompt to download the 3D Template if this is the first time you have used it. Look for this prompt on the 3D
card when you select it.
3. Create a cube primitive in your empty Scene: right-click an empty section in the Hierarchy and select 3D Object > Cube.
4.The default 3D Scene
In the Microgames, you started in a Scene
that was already built for you, with characters
that moved and responded to your
commands, a rigid ground on which they
traveled, and goals and obstacles to make
the game interesting. Now, however, you are
working in vast, boundless, empty space. A
plane that looks like the ground is just for
reference — it is not even a rigid surface.
The default 3D Scene comes equipped with two important GameObjects, which are listed in the Hierarchy window:
● Main Camera, which controls what your players will see in the Game view (Play mode)
● Directional Light, which simulates the sun and provides light that will reflect off 3D your GameObjects to create realistic
visual effects
We will return to these after you have added some GameObjects to your Scene — so that the Main Camera has something to
view and the Directional Light has something off which to reflect.
5.Work with GameObjects in the Inspector
The Inspector window is where you will view and change the properties of GameObjects and other types
of objects.
1. In the Scene view, select the cube GameObject you have created.
2. With Cube selected, look at the GameObject’s properties in the Inspector window.
Each section of the Inspector represents a component, which is a set of properties and behaviors of the
selected GameObject. Some components are built-in to primitives like the ones you see here. Later, you
will add more components to give GameObjects more sophisticated properties and behaviours.
With the Cube selected, the Transform Component displays the size, rotation, and position of the Cube in
the Scene using X,Y, and Z values. By default, these values are meters.
Note: Unity uses a Y-up coordinate system. This means that in the Editor screen space, the Y direction
is vertical and X and Z represent the horizontal plane (similar to north, south, east, and west). Some 3D
applications, such as 3DsMax, use Z as the vertical.
3. Select F on the keyboard to focus on the
Cube. (Tip: The Scene view window must be
activated; you can select a GameObject in
Scene view, or right-click anywhere, to
activate the window.)
5.Work with GameObjects in the Inspector
By default, the Move tool is selected, and its
Gizmo is located in the center of the cube.
The arrows point in the positive directions in
each dimension. The dimensions are color
coded. You can always get your bearings by
looking at the Scene Gizmo in the upper
right corner of the Scene view.
5.Work with GameObjects
in the Inspector
4. With the Cube selected, change the Y
value of the Scale in the Transform
Component to 4. The Cube height will
change to 4. Zoom out as needed.
6.Organize GameObjects in the Hierarchy
You can use the Hierarchy window to organize your GameObjects and
define their relationships to each other. You can group them in the
Hierarchy to create more complex GameObjects.
1. Right-click the Cube in the Hierarchy window so that it is selected.
2. Select 3D Object > Sphere.
As shown in the Hierarchy, the Sphere is a child GameObject of the
Cube. These two objects are now linked. You can operate on them as a
unit.
3. This sphere is inside the Cube where you can’t see it. Select
Sphere in the Hierarchy, and the Gizmo will appear so that you can
move it in the Scene view to a location at least partially visible
outside of Cube. It will be tall, not spherical, because its initial
dimensions were based on its parent.
6.Organize GameObjects in the Hierarchy
4. Select the parent object, Cube, and move it. Cube and Sphere
will move together. Try scaling and rotating your object, too.
To remove the parent-child relationship, drag the Sphere in the
Hierarchy up and all the way to the left, to indicate the root level.
Both GameObjects now appear as independent GameObjects in the
Hierarchy.
7.Next steps
You’ve seen how to add simple GameObjects, called
primitives, to your Scene, and you’ve seen the ways these
GameObjects are represented in the Hierarchy and
Inspector windows. You’ve seen how to move, rotate, and
scale GameObjects two ways: with numbers in the
Inspector, or by physically changing them in the Scene
view.
Now you’re ready for a practical exercise: building a
structure using primitives.
This tutorial is an exercise in which you can apply
your understanding of GameObjects and
transforms to build a structure out of 3D primitives.
In this tutorial, you will:
● Add primitives to an empty Scene.
● Create an empty GameObject as a parent for
other GameObjects.
● Duplicate GameObjects.
● Create parent-child relationships between
GameObjects using the Hierarchy window.
● Navigate around the Scene in the 3D space.
● Transform the primitives to a given position,
rotation, and scale.
1.Overview
This tutorial is an exercise in which you will build an
architectural GameObject made up of multiple primitives.
This exercise will give you a firm grasp of how to create
and manipulate GameObjects, and it will give you practice
navigating around a Scene.
Here is the structure you will build.
As you build this structure, you might want to change your
view of the Scene to make sure GameObjects are aligned.
For a review, see Navigating the scene.
2.Create an empty GameObject
An empty GameObject is a
placeholder object that can be
created in the Hierarchy. It
does not have a visible
representation in the Scene,
and it can act as a container for
other GameObjects (among
other things to be explained
later).
1. Right-click in the Hierarchy
and select Create Empty.
2. Rename this GameObject to
Monument in the Inspector.
3. Select this new GameObject in
the Scene view. In the Inspector,
reset the position by selecting the
three dots on the right and then
selecting Reset Position. This sets
the position of the center of the
GameObject to 0,0,0, aligning it to
the center of your Scene.
3.Create the steps
1. In the Hierarchy, right-click the Monument
GameObject and select 3D Object > Cube to
create a new cube as a child of Monument.
2. Rename this new GameObject to Floor.
3. Right-click on the Floor
GameObject and select
Duplicate. (Shortcut: select
Floor and press Ctrl-D.)
Duplicate Floor six more
times so that you have the
original Floor and seven
duplicates, for a total of
eight floors that are children
of Monument.
3.Create the steps
4.Transform the steps
In these tasks, you will change the Transform Component values
of each of the Floor objects to create the stair-step effect.
1. Select the first Floor child object and change the Transform
Component values in the Inspector as shown below.
4.Transform the steps
2. Do the same for the rest of the Floor objects
using the values indicated below.
Values for Floor (1) GameObject
Values for Floor (2) GameObject
Values for Floor (3) GameObject
4.Transform the steps
By now you should have
something similar to this:
4.Transform the steps
Values for Floor (4) GameObject
Values for Floor (5) GameObject
Values for Floor (6) GameObject
Values for Floor (7) GameObject
You should now have the steps of the monument.
5.Create the walls
1. Create another Cube
primitive as a child of the
Monument GameObject and
rename it to Wall.
2. Change the values in
the Inspector as shown
below.
The wall is now rotated so that it is diagonal across the Floor.
3. Duplicate the wall three
times and change the
Transform Component values
as shown below.
Wall (1) GameObject
Wall (3) GameObject
Wall (2) GameObject
You will now have 4 walls at 45 degrees.
6.Create the roof
1. Create a new
empty
GameObject as a
child of the
Monument
GameObject and
name it Platform.
2. Drag all the floor objects
into the Platform GameObject.
This creates what is called a
nested GameObject, in which
objects are nested at multiple
levels as children of one
GameObject. In this case, the
Monument GameObject is the
parent, and all the Floor
GameObjects are its children.
When you group objects
together like this, you can
manipulate them all together
and make copies of the whole
group while still maintaining
the relationships between
them.
3. Duplicate the Platform GameObject. The duplicate Platform will include duplicate child objects. Rename this copy of
Platform to Roof.
4. Select the Roof and use the Move and Rotate tools to put the roof onto the structure. Try positioning the Roof in the
Scene view without changing the numbers in the Transform Component, but when you are done, the numbers should look
like the ones shown below.
You have created a monument in Unity! Along the way you learned some new
concepts and practiced some old ones, such as:
● Creating an empty GameObject as a container for other GameObjects.
● Duplicating GameObjects.
● Using the Transform Component to manipulate child GameObjects.
● Nesting GameObjects to multiple levels.
● Using the Move and Rotate tools to transform a child GameObject.
Next, you will get a glimpse of the power you have over your GameObjects by
doing more with components.
Summary
In this tutorial, you will see how components add functionality to GameObjects. The
component you will see in action here, the RigidBody Component, lets a GameObject
behave like a physical object instead of floating in space. In this tutorial, you will:
● Position the Main Camera to display action in the Game view.
● Explore the relationship between GameObjects and components.
● Identify specific components in the Inspector window.
● Add physical properties to a 3D GameObject by applying the RigidBody component
and setting its properties.
● Enter Play mode to preview a Scene in the Game view.
● Experiment with 3D physics in Unity.
1.Overview
Components add behaviors and functionality to a GameObject. You have
used the Transform Component — and that is just the beginning! In this
tutorial, you will add another component, the RigidBody Component, which
gives a GameObject physical properties so that it can interact with gravity
and other GameObjects. You will also position the Main Camera to watch
how a GameObject responds to gravity in 3D.
2.Before you begin
1. Create a new
Sphere
GameObject in the
Hierarchy.
2. Move the
sphere to the
space inside the
Monument, so
that it is
positioned in
“mid-air” above
the steps. You
can use the
Transform tools,
the Transform
Component in the
Inspector, or
both.
3.Position the Main Camera
In every new Scene, there is a camera like the one shown below.
This camera, named Main Camera in the
Hierarchy, captures and displays your
Scene to the player as it appears in the
Game view. While the Scene view is
where you build Scenes, the Game view
is a preview of the way your game
appears to the player.
The camera in your Scene is a
GameObject like any other. When you
select it, you will see its Transform
Component in the Inspector window. You
can change these settings as you would
with any other GameObject. Note that
scaling a camera will have no effect.
When you select a camera, you see the
outlines of a pyramid-like shape called
the frustum. The frustum shows you
what part of your Scene the camera is
viewing. Anything outside the frustum is
not visible to the camera.
When a camera is selected (1), you can expand the Camera Component in the
Inspector (2) to open a Camera Preview window (3) that shows you what is visible
to the camera in the Scene.
Move the camera to a position where it can “see” the ball and the steps below it.
Tip: You can also move the camera to align with your current scene view by selecting it in the Hierarchy window and then pressing
Ctrl+Shift+F.
Select the play button to run the game. Notice that nothing is happening at the moment. This is because you still need to apply a
component to the sphere to tell it how it needs to interact with the physics of the game. In this case, you need to make it solid so that
it reacts to gravity.
4.Make the sphere solid
Remember when you created a sphere that was inside a cube? Objects in the physical
world don’t exist inside other objects that way, but in a Unity Scene, by default,
GameObjects don’t have mass or respond to gravity. To make a GameObject behave
like a real-world physical object, you can give it physical properties by adding a
RigidBody Component.
To add the RigidBody Component to the Sphere GameObject:
1. In the Hierarchy window, select the Sphere.
2. Select the Add Component button in the Inspector window.
3. Use the search bar to find a Rigidbody component and select it. Note that there are two options available, Rigidbody and
Rigidbody 2D. Make sure you select the Rigidbody component, not the 2D one.
4. In the RigidBody Component in the Inspector, select Use Gravity if it is not already selected.
5. To see the effect of these properties, start the game by pressing the Play button, which will display the Game
view.
The ball falls and rolls down the steps. If it does not roll, try moving it to a new position using the transform tools and
run the game again.
Note: for Physics Best Practises see this Tutorial for more information.
5.Experiment with falling
GameObjects
Try variations of this exercise. Move the Sphere GameObject and the Main Camera to get the results you want. More things to try:
● Add more spheres with RigidBody Components at varying heights.
● Add other primitives and see how they behave.
● Drop objects in different places.
● Rotate the Monument GameObject.
One thing to note is that you can change the properties, values and position of a selected GameObject while the game is running,
but when the game is stopped all values will revert back to what they were before the game was started. This is useful to test
different parameters during runtime, but if you want the changes to be permanent, you need to make the changes while the game is
stopped.
Summary
In this tutorial, you’ll explore some visual and physical effects you can achieve in a 3D Scene.
You will:
● Create and configure a new Material to add visual properties to a GameObject.
● Create and configure a Physic Material to add physical properties to a GameObject.
● Configure the directional light.
Materials
Herringbone_Brick_baseColor.png
1.Overview
Materials are components that define
the surface characteristics of objects,
and how those surfaces interact with
light. In each new 3D Scene, directional
light is included to simulate the sun. In
this tutorial, you will create a simple
Material to change the visual appearance
of a GameObject, and use a Material to
change physical properties as well. The
directional light will bounce off the
GameObject with its Material to create a
visually realistic effect.
2.Before you begin
The visual appearance of the Material will come from an image file. You can download the file used in the steps
below, Herringbone_Brick_baseColor.png, by selecting Tutorial Materials in the masthead at the top of this
tutorial.
3.Import an
image file
1. To make your Unity windows match the
examples below, right-click the tab of the
Project window and select Two Column
Layout if it is not selected already. The
folders of your project appear in the left
column, and the contents of the selected
folder appear in the right column.
2. Right-click the Assets folder in the Project
window and select Create > Material.
3. Rename the new Material as BrickMaterial.
The preview of the new Material is a 3D
sphere, so that you can see how light interacts
with the Material at many angles. When you
select the Material in the Project window, a
more accurate preview appears in a resizable
pane of the Inspector.
4. Download the file
Herringbone_Brick_baseColor.png from the Files
listed at the beginning of this tutorial, or go to this
URL: https://connect-prd-
cdn.unity.com/20201001/26e9117a-554a-406c-
824e-
a4fa4e649738/Herringbone_Brick_baseColor.png
?_ga=2.232157087.1042105687.1641258304-
2084102660.1641258304
5. To import the file into
the project, you can
simply move the
downloaded file to the
Assets folder for this
Unity project, which is
represented in the
Project window. To see
the contents of the
Assets folder in your file
explorer, right-click the
Assets folder and select
Show in Explorer.
6. In your computer’s file
explorer, move the
Herringbone_Brick_baseCo
lor.png file into your Assets
folder. When you return to
Unity, you will see its icon.
4.Create the Brick Material
1. Select the BrickMaterial.
2. In the Inspector window, select the
circle icon next to the Albedo property.
Albedo encompasses the reflective
properties of the Material, based on a
solid color or an image.
3. Select
Herringbone_Brick_baseColor from the
list of images in your project.
The image is now applied to the material
as the Albedo map, and will appear in the
Material preview.
4. Create a new
cube GameObject in
the Scene.
5. Drag the material
onto the cube in the
Scene view.
6. The cube now displays the brick Material.
7. To change the scale of
the Material, select the
cube, open the
BrickMaterial Component
in the Inspector, and
change the Tiling X and Y
properties. Smaller
numbers make the bricks
appear larger.
5.Adding a Physic Material
Earlier, you added a Rigidbody component
to a GameObject to give it physical
properties. You can also add additional
physical characteristics with another type of
Material called Physic Materials. With
Physic Materials, you can make an object
bounce and change its friction and drag
properties.These properties take effect when
the object is under the effects of gravity.
Physic Materials don’t change the visual
properties of the GameObject’s mesh.
1. In the Project window, create a new
folder called Materials. Right-Click in the
Materials folder in the Assets window and
select Create > Physic Material.
2. Rename the material to BouncyBall.
3. Select the new Physic Material.
4. Change the Bounciness value to 1
in the Inspector window.
5. Select the cube. In the Inspector
window, select Add Component and
add a RigidBody component.
6. Your cube should already have a Box Collider component added to it.
This component is automatically added when you create the cube in the
scene. Drag the new Bounce physics material you created earlier into the
Material slot in the Box Collider component.
7. Run the game. Your cube should now fall to the platform and have a bit of bounce when it hits the
floor.
8. Experiment with your bouncy cube: try rotating it, duplicating it, and making cubes fall on top of each
6.Adjusting the Lighting in the scene
In a new 3D Scene, an object named Directional Light is included to
simulate sunlight. You can manipulate this light with transform tools like any
other GameObject.
1. Select the Directional Light in the Hierarchy window.
2. Change the rotation of the light using the transform tools Move (shortcut key “w”) and Rotate (shortcut key “e”). Directional lights
simulate a light source that bathes the entire scene in light coming from a specific direction. Changing the position of the light will not
have an influence on the scene but changing the rotation will change the angle of the light in the Scene. Take note of how the sky
and ambient light changes as you change the angle of the light.
Directional light is just one
type of light. If you are
interested in other types, see
Types of light.
7.Next steps
In this tutorial, you have seen how Materials and light work together to make GameObjects look visually realistic. You also
used a Material to add physical properties to a GameObject, and you adjusted the directional light. In real-world applications,
however, you will need more than spheres and cubes. In the next tutorial, you will see how to get more sophisticated
GameObjects into your projects without having to build them from scratch.
Summary
In this tutorial, we’ll explain sources of 3D assets: assets made with Digital Content Creation (DCC) tools or
procured from the Unity Asset Store. We will walk through the steps for using the Asset Store to get assets
you will need for the tutorial following this one.
In this tutorial, you’ll be able to:
● Explain the content creation tools that support real-time 3D production
● Navigate to the Asset Store in a web browser
● Search and filter a search in the Asset Store
● Import an asset from the Asset Store automatically via a Unity account
● Materials
Video Transcript - Get 3D Assets.zip
1.Overview
The Unity Engine is where assets come together to make interactive experiences, but it is not necessarily where
those assets are made. This tutorial explains how 3D assets are built using 3D Digital Content Creation tools (3D
DCCs), and how you can get assets built with these tools from the Unity Asset Store. We’ll show you how to import
some assets that will be useful in the challenge for this learning project.
The 3D assets made in DCCs are
brought into a real-time engine such
as Unity, where they are integrated
into a larger project like a game,
simulation, or animated film.
2.What are 3D DCCs?
3D Digital Content Creation tools (DCCs)
such as Maya, ZBrush, and Blender allow
artists to create environments, models, and
characters in three dimensions.
In these programs, artists model the shape
of a 3D object, rig it so that it can be
animated, animate it to move in a particular
way, and texture it to give it color and
shading. An example of this is shown below.
3.Other resources for 3D
assets in Unity
It is possible to create 3D art and
environments within the Unity
editor using a tool called
ProBuilder. Probuilder has limited
functionality compared to
dedicated DCCs, but it is helpful
for artists who want to quickly
model 3D objects without
opening an external editing tool.
Not everyone has the time to learn a 3D DCC or the budget to hire someone to create 3D art for
them, but there are many online resources for obtaining high quality assets. In addition to sites like
CGTrader and Turbosquid, which offer 3D models for all purposes, the Unity Asset Store is an
invaluable resource for art specifically designed with Unity in mind.
4.Exercise
Creating 3D art is a laborious, time-intensive practice that requires patience and dedication. To gain an understanding of this
practice, search online for a video of “speed art” using the DCC tool of your choice. Speed art is a genre of online video
content in which a recording of someone’s artistic process is sped up so you can appreciate all the work that went into it.
Watch one of these videos and consider: was anything about the process surprising? Share your observations in the
comments.
5.Get assets from the Asset Store
You can take advantage of the talent, time, and effort it takes to create 3D assets by visiting the Unity Asset Store. The Asset Store
is a convenient platform for specialized asset creators to share or sell their work, and for real-time creators to find pre-designed, pre-
built assets that are ready to use. These assets include 3D models, Materials, animations, loading screens, scripts, and anything else
you might need for your project.
1. Go to the Unity Asset store (this link will open in your default browser) and log in with your Unity ID.
Hint: Anything you acquire through the Asset Store will be linked to your Unity account and will be available in the Editor as long as
you are signed in with the same Unity ID.
2. In the Asset Store search tab, type “materials” to search for available Material assets.
3. In the Pricing section of the filter panel, select Free Assets.
4. Select a free asset package containing Materials. We recommend Yughues Free Ground Materials. Be sure to find assets that
are compatible with the version of Unity you are using.
5. For complete and up-to-date instructions on downloading and importing your assets into your project, refer to Import assets from
the Asset Store.
6. Select one of the Materials and drag it onto the ground platform. The Material is
now added to your GameObject.
6.Next steps
In this tutorial, you witnessed the role of the Asset Store in the Unity ecosystem, and you downloaded and imported free
assets. Next, we encourage you to use those assets — or others you might find in the Asset Store — to complete a challenge
assignment on your own.
Summary
It’s time to put your new skills to the test! In this challenge
assignment, you will create a track for a ball to roll on without
touching the floor. Make your track as long as you dare, but don’t
let the ball drop, because the floor is lava.
When you’ve finished, you’ll be able to submit your work, and see
what others have submitted.
1.Overview
In this challenge, you will build your own Scene using primitive GameObjects and free assets. In the process of meeting this
challenge, you will:
● Create a new 3D Scene.
● Create new primitives.
● Navigate 3D space in the Scene view.
● Move, rotate, and scale GameObjects.
● Move and rotate the Main Camera.
● Add a RigidBody Component to a GameObject.
● Create and apply new Materials.
● Playtest your game in the Game view.
2.Build your Scene
A few instructions are provided below, but the creative part is all up to you.
1. Start a new Unity project using the 3D Template.
2. If you want to use imported assets, import them using the same process covered previously
under Importing an image.
3. Using Unity primitives and any imported assets, create a path for a ball to roll from one location
to another without falling or touching the floor.
Tip: Start by creating a floor object and then using other assets and primitives to lay out your
Scene.
4. Import materials from the Unity Asset Store or create your own to give your Scene some life.
5. Using the same steps covered previously under Make the sphere solid, add RigidBody
components to the relevant elements in your Scene until the ball can roll down your track.
6. Position the Main Camera to find a good viewpoint.
7. Run the Scene to test it, and make adjustments as necessary until the ball runs through the
whole track you created.
8. Apply any other skills you have learned to make the Scene uniquely your own.
Note: Be sure to save your entire project by selecting File > Save Project, or by selecting
Save when you exit the Unity Editor. We will come back to this project later.
3.Next steps
Did you make the ball bounce? Did you make the floor lava? Or did you go in a different direction? Whatever you have created,
we’d like for you to share it with the Unity Learn community — but first, you will have to build your project to be playable. That’s
the next tutorial.
Summary
Let’s see what you’ve made! In this tutorial, you’ll:
● Set the platform for a build of a Unity project
● Create a basic build of a Unity project.
● Share your project with the Unity Learn community.
To complete the requirements for this Mission, submit your 3D project to the gallery in this tutorial. (You
may share it with others or keep it private.)
1.Overview
When your game is ready, it is time to create a build, which is a standalone, playable version of your game. Unity supports
most popular platforms, including mobile (Android and iOS), which allows you to quickly publish your project with a few
simple clicks.
Keep in mind that while it is easy to publish to different platforms, it is up to you, the game developer, to make sure that your
game can run on the target platforms. For example, the resources available on a smartphone are vastly different than those on
a Playstation. Just because you can build for a platform, your game will not necessarily run on that platform.
In this tutorial, you will create and publish a WebGL build so that you can share your project on the web with the Unity
Essentials community and your fellow creators, if you like. You can publish your WebGL build on Unity Play or use other hosting
platforms.
2.Submit your project
You’re going to create a build that others can play online — a WebGL build is the best fit for that. The process broadly is the same
for publishing to any other platform such as Windows, Linux or MacOS.
To make your submission:
1. Follow these steps to create and publish a WebGL build of your Unity project.
2. Once you’ve done that, then use the form below to submit your project to Unity Learn.
Important: The submission is required to complete this mission of the Unity Essentials pathway.

Contenu connexe

Tendances

腾讯大讲堂51 游戏产品运营事故案例介绍
腾讯大讲堂51 游戏产品运营事故案例介绍腾讯大讲堂51 游戏产品运营事故案例介绍
腾讯大讲堂51 游戏产品运营事故案例介绍
George Ang
 

Tendances (20)

Building a turn-based game prototype using ECS - Unite Copenhagen 2019
Building a turn-based game prototype using ECS - Unite Copenhagen 2019Building a turn-based game prototype using ECS - Unite Copenhagen 2019
Building a turn-based game prototype using ECS - Unite Copenhagen 2019
 
Unity Game Engine - Basics
Unity Game Engine - BasicsUnity Game Engine - Basics
Unity Game Engine - Basics
 
Unity 3d
Unity 3dUnity 3d
Unity 3d
 
Unity
UnityUnity
Unity
 
Built for performance: the UIElements Renderer – Unite Copenhagen 2019
Built for performance: the UIElements Renderer – Unite Copenhagen 2019Built for performance: the UIElements Renderer – Unite Copenhagen 2019
Built for performance: the UIElements Renderer – Unite Copenhagen 2019
 
Android - Graphics Animation in Android
Android - Graphics Animation in AndroidAndroid - Graphics Animation in Android
Android - Graphics Animation in Android
 
Synfig
SynfigSynfig
Synfig
 
WebGL Fundamentals
WebGL FundamentalsWebGL Fundamentals
WebGL Fundamentals
 
Macromedia Flash Player Practical file
Macromedia Flash Player Practical file Macromedia Flash Player Practical file
Macromedia Flash Player Practical file
 
The Production and Visual FX of Killzone Shadow Fall
The Production and Visual FX of Killzone Shadow FallThe Production and Visual FX of Killzone Shadow Fall
The Production and Visual FX of Killzone Shadow Fall
 
Membuat hexagonal 3D prisma dengan coreldraw
Membuat hexagonal 3D prisma dengan coreldrawMembuat hexagonal 3D prisma dengan coreldraw
Membuat hexagonal 3D prisma dengan coreldraw
 
ECS: Streaming and Serialization - Unite LA
ECS: Streaming and Serialization - Unite LAECS: Streaming and Serialization - Unite LA
ECS: Streaming and Serialization - Unite LA
 
The스프라이트
The스프라이트The스프라이트
The스프라이트
 
Photoshop notes
Photoshop notesPhotoshop notes
Photoshop notes
 
Optimizing Large Scenes in Unity
Optimizing Large Scenes in UnityOptimizing Large Scenes in Unity
Optimizing Large Scenes in Unity
 
PYTHON - TKINTER - GUI - PART 1.ppt
PYTHON - TKINTER - GUI - PART 1.pptPYTHON - TKINTER - GUI - PART 1.ppt
PYTHON - TKINTER - GUI - PART 1.ppt
 
CryENGINE 3 Rendering Techniques
CryENGINE 3 Rendering TechniquesCryENGINE 3 Rendering Techniques
CryENGINE 3 Rendering Techniques
 
Bringing Machine Learning to Unity by Arthur Juliani from Unity
Bringing Machine Learning to Unity  by Arthur Juliani from UnityBringing Machine Learning to Unity  by Arthur Juliani from Unity
Bringing Machine Learning to Unity by Arthur Juliani from Unity
 
Quantum QIS (QGIS) Araç Çubukları
Quantum QIS (QGIS) Araç ÇubuklarıQuantum QIS (QGIS) Araç Çubukları
Quantum QIS (QGIS) Araç Çubukları
 
腾讯大讲堂51 游戏产品运营事故案例介绍
腾讯大讲堂51 游戏产品运营事故案例介绍腾讯大讲堂51 游戏产品运营事故案例介绍
腾讯大讲堂51 游戏产品运营事故案例介绍
 

Similaire à Unity - Building Your First Real-Time 3D Project - All Slides

How tomakea gameinunity3d
How tomakea gameinunity3dHow tomakea gameinunity3d
How tomakea gameinunity3d
Dao Tung
 
Polybot Onboarding Process
Polybot Onboarding ProcessPolybot Onboarding Process
Polybot Onboarding Process
Nina Park
 
Fps tutorial 1
Fps tutorial 1Fps tutorial 1
Fps tutorial 1
unityshare
 
Gm tutorial adding depth tutorial by game maker
Gm tutorial   adding depth tutorial by game makerGm tutorial   adding depth tutorial by game maker
Gm tutorial adding depth tutorial by game maker
Jin Toples
 

Similaire à Unity - Building Your First Real-Time 3D Project - All Slides (20)

Unity - Building your first real-time 3D project
Unity - Building your first real-time 3D projectUnity - Building your first real-time 3D project
Unity - Building your first real-time 3D project
 
Introduction to Game Programming: Using C# and Unity 3D - Chapter 2 (Preview)
Introduction to Game Programming: Using C# and Unity 3D - Chapter 2 (Preview)Introduction to Game Programming: Using C# and Unity 3D - Chapter 2 (Preview)
Introduction to Game Programming: Using C# and Unity 3D - Chapter 2 (Preview)
 
Unity - Create a structure with primitives
Unity - Create a structure with primitivesUnity - Create a structure with primitives
Unity - Create a structure with primitives
 
Unity - Add components to 3D GameObjects
Unity - Add components to 3D GameObjectsUnity - Add components to 3D GameObjects
Unity - Add components to 3D GameObjects
 
02 unity 3_d_part_1
02 unity 3_d_part_102 unity 3_d_part_1
02 unity 3_d_part_1
 
Introduction to Game Programming: Using C# and Unity 3D - Chapter 3 (Preview)
Introduction to Game Programming: Using C# and Unity 3D - Chapter 3 (Preview)Introduction to Game Programming: Using C# and Unity 3D - Chapter 3 (Preview)
Introduction to Game Programming: Using C# and Unity 3D - Chapter 3 (Preview)
 
03 unity 3_d_part_2
03 unity 3_d_part_203 unity 3_d_part_2
03 unity 3_d_part_2
 
Cmd unity withc
Cmd unity withcCmd unity withc
Cmd unity withc
 
3d game engine
3d game engine3d game engine
3d game engine
 
How tomakea gameinunity3d
How tomakea gameinunity3dHow tomakea gameinunity3d
How tomakea gameinunity3d
 
Unity introduction for programmers
Unity introduction for programmersUnity introduction for programmers
Unity introduction for programmers
 
Let's make a game unity
Let's make a game   unityLet's make a game   unity
Let's make a game unity
 
Polybot Onboarding Process
Polybot Onboarding ProcessPolybot Onboarding Process
Polybot Onboarding Process
 
2d game engine workflow
2d game engine workflow2d game engine workflow
2d game engine workflow
 
Unity3d scripting tutorial
Unity3d scripting tutorialUnity3d scripting tutorial
Unity3d scripting tutorial
 
Fps tutorial 1
Fps tutorial 1Fps tutorial 1
Fps tutorial 1
 
course1-Intrduction-to-the-game-industry.pdf
course1-Intrduction-to-the-game-industry.pdfcourse1-Intrduction-to-the-game-industry.pdf
course1-Intrduction-to-the-game-industry.pdf
 
Programmers guide
Programmers guideProgrammers guide
Programmers guide
 
Gm tutorial adding depth tutorial by game maker
Gm tutorial   adding depth tutorial by game makerGm tutorial   adding depth tutorial by game maker
Gm tutorial adding depth tutorial by game maker
 
Spine Simplified
Spine SimplifiedSpine Simplified
Spine Simplified
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 

Unity - Building Your First Real-Time 3D Project - All Slides

  • 1. Summary In this learning project, you will be introduced to some of the essential tasks of an artist, game developer, or other creator of interactive 3D experiences. You’ll explore the 3D capabilities and features of Unity, starting with creating and manipulating 3D objects. You will learn about components, which give you control over the ways objects look and behave. You will control lighting effects and experiment with Materials, which give 3D objects a realistic appearance. Project Objective By the end of this learning project you will be able to: ● Create a new 3D project. ● Create 3D objects in the Unity Editor. ● Move, scale, and rotate objects in 3D space. ● Control the properties and behaviors of 3D objects using components. ● Create and apply a Material to a 3D object. ● Adjust the Directional Light in a 3D Scene. ● Find and import 3D assets from the Unity Asset Store. ● Publish a 3D project.
  • 2. Summary In this tutorial, you’ll begin working in the Unity Editor with more independence than you might have experienced with the Microgames. Using a new Unity project and 3D Scene you create from scratch, you will work with GameObjects and explore the various ways you can manipulate them in the Unity Editor. In this tutorial, you will: ● Create new 3D GameObjects. ● Select 3D objects in both the Hierarchy and Inspector windows of the Unity Editor. ● Move, rotate, and scale 3D objects using numerical values using the Transform Component in the Inspector window. ● Move, rotate, and scale 3D objects in the Scene view using the Unity transform tools. ● Link GameObjects in parent-child relationships using the Hierarchy window to create complex GameObjects. ● Identify the relationship between the properties displayed in the Inspector and the display of GameObjects in the Scene.
  • 3. 1.Overview In this tutorial, you’ll apply what you have learned about the Unity Editor as you create and manipulate GameObjects in a Scene. You’ll build more fundamental skills as you learn how to use the Hierarchy and Inspector windows to organize and configure your GameObjects.
  • 4. 2.Before you begin Get familiar with the Editor controls In this tutorial, you’ll begin using the techniques you learned in a Microgame and in the previous Unity Essentials mission. As we go through the next learning projects, we assume that you can manipulate GameObjects and navigate in 3D space. To review, see Explore the Unity Editor for basic techniques, tips, and tricks. Try a Microgame If you are new to Unity and you haven’t already taken the tutorials in one of the Microgames available in the Unity Hub, we highly recommend them — especially the LEGO® Microgame! Any of these Microgames will give you a good introduction to the Unity Editor. Note: If you completed the LEGO® Microgame, you used some custom functionality that recreates the experience of using physical LEGO® bricks inside the Unity Editor. Here, you will not see the special LEGO enhancements — you’ll be using the uncustomized Unity Editor.
  • 5. 3.Create a new 3D project and Scene Important: If you have already created a Unity project named “Essentials 3D project” in a previous mission, open that project from the Unity Hub and skip this step. Follow these steps if you need to create a new Unity project for this tutorial: 1. Open the Unity Hub. 2. Create a new Unity project using the 3D Template. Name this project “Essentials 3D project.” Note: You might see a prompt to download the 3D Template if this is the first time you have used it. Look for this prompt on the 3D card when you select it. 3. Create a cube primitive in your empty Scene: right-click an empty section in the Hierarchy and select 3D Object > Cube.
  • 6. 4.The default 3D Scene In the Microgames, you started in a Scene that was already built for you, with characters that moved and responded to your commands, a rigid ground on which they traveled, and goals and obstacles to make the game interesting. Now, however, you are working in vast, boundless, empty space. A plane that looks like the ground is just for reference — it is not even a rigid surface. The default 3D Scene comes equipped with two important GameObjects, which are listed in the Hierarchy window: ● Main Camera, which controls what your players will see in the Game view (Play mode) ● Directional Light, which simulates the sun and provides light that will reflect off 3D your GameObjects to create realistic visual effects We will return to these after you have added some GameObjects to your Scene — so that the Main Camera has something to view and the Directional Light has something off which to reflect.
  • 7. 5.Work with GameObjects in the Inspector The Inspector window is where you will view and change the properties of GameObjects and other types of objects. 1. In the Scene view, select the cube GameObject you have created. 2. With Cube selected, look at the GameObject’s properties in the Inspector window. Each section of the Inspector represents a component, which is a set of properties and behaviors of the selected GameObject. Some components are built-in to primitives like the ones you see here. Later, you will add more components to give GameObjects more sophisticated properties and behaviours. With the Cube selected, the Transform Component displays the size, rotation, and position of the Cube in the Scene using X,Y, and Z values. By default, these values are meters. Note: Unity uses a Y-up coordinate system. This means that in the Editor screen space, the Y direction is vertical and X and Z represent the horizontal plane (similar to north, south, east, and west). Some 3D applications, such as 3DsMax, use Z as the vertical.
  • 8. 3. Select F on the keyboard to focus on the Cube. (Tip: The Scene view window must be activated; you can select a GameObject in Scene view, or right-click anywhere, to activate the window.) 5.Work with GameObjects in the Inspector By default, the Move tool is selected, and its Gizmo is located in the center of the cube. The arrows point in the positive directions in each dimension. The dimensions are color coded. You can always get your bearings by looking at the Scene Gizmo in the upper right corner of the Scene view.
  • 9. 5.Work with GameObjects in the Inspector 4. With the Cube selected, change the Y value of the Scale in the Transform Component to 4. The Cube height will change to 4. Zoom out as needed.
  • 10. 6.Organize GameObjects in the Hierarchy You can use the Hierarchy window to organize your GameObjects and define their relationships to each other. You can group them in the Hierarchy to create more complex GameObjects. 1. Right-click the Cube in the Hierarchy window so that it is selected. 2. Select 3D Object > Sphere. As shown in the Hierarchy, the Sphere is a child GameObject of the Cube. These two objects are now linked. You can operate on them as a unit.
  • 11. 3. This sphere is inside the Cube where you can’t see it. Select Sphere in the Hierarchy, and the Gizmo will appear so that you can move it in the Scene view to a location at least partially visible outside of Cube. It will be tall, not spherical, because its initial dimensions were based on its parent. 6.Organize GameObjects in the Hierarchy 4. Select the parent object, Cube, and move it. Cube and Sphere will move together. Try scaling and rotating your object, too. To remove the parent-child relationship, drag the Sphere in the Hierarchy up and all the way to the left, to indicate the root level. Both GameObjects now appear as independent GameObjects in the Hierarchy.
  • 12. 7.Next steps You’ve seen how to add simple GameObjects, called primitives, to your Scene, and you’ve seen the ways these GameObjects are represented in the Hierarchy and Inspector windows. You’ve seen how to move, rotate, and scale GameObjects two ways: with numbers in the Inspector, or by physically changing them in the Scene view. Now you’re ready for a practical exercise: building a structure using primitives.
  • 13. This tutorial is an exercise in which you can apply your understanding of GameObjects and transforms to build a structure out of 3D primitives. In this tutorial, you will: ● Add primitives to an empty Scene. ● Create an empty GameObject as a parent for other GameObjects. ● Duplicate GameObjects. ● Create parent-child relationships between GameObjects using the Hierarchy window. ● Navigate around the Scene in the 3D space. ● Transform the primitives to a given position, rotation, and scale.
  • 14. 1.Overview This tutorial is an exercise in which you will build an architectural GameObject made up of multiple primitives. This exercise will give you a firm grasp of how to create and manipulate GameObjects, and it will give you practice navigating around a Scene. Here is the structure you will build. As you build this structure, you might want to change your view of the Scene to make sure GameObjects are aligned. For a review, see Navigating the scene.
  • 15. 2.Create an empty GameObject An empty GameObject is a placeholder object that can be created in the Hierarchy. It does not have a visible representation in the Scene, and it can act as a container for other GameObjects (among other things to be explained later). 1. Right-click in the Hierarchy and select Create Empty.
  • 16. 2. Rename this GameObject to Monument in the Inspector. 3. Select this new GameObject in the Scene view. In the Inspector, reset the position by selecting the three dots on the right and then selecting Reset Position. This sets the position of the center of the GameObject to 0,0,0, aligning it to the center of your Scene.
  • 17. 3.Create the steps 1. In the Hierarchy, right-click the Monument GameObject and select 3D Object > Cube to create a new cube as a child of Monument. 2. Rename this new GameObject to Floor.
  • 18.
  • 19. 3. Right-click on the Floor GameObject and select Duplicate. (Shortcut: select Floor and press Ctrl-D.) Duplicate Floor six more times so that you have the original Floor and seven duplicates, for a total of eight floors that are children of Monument. 3.Create the steps
  • 20. 4.Transform the steps In these tasks, you will change the Transform Component values of each of the Floor objects to create the stair-step effect. 1. Select the first Floor child object and change the Transform Component values in the Inspector as shown below.
  • 21. 4.Transform the steps 2. Do the same for the rest of the Floor objects using the values indicated below. Values for Floor (1) GameObject Values for Floor (2) GameObject Values for Floor (3) GameObject
  • 22. 4.Transform the steps By now you should have something similar to this:
  • 23. 4.Transform the steps Values for Floor (4) GameObject Values for Floor (5) GameObject Values for Floor (6) GameObject Values for Floor (7) GameObject
  • 24. You should now have the steps of the monument.
  • 25. 5.Create the walls 1. Create another Cube primitive as a child of the Monument GameObject and rename it to Wall. 2. Change the values in the Inspector as shown below.
  • 26. The wall is now rotated so that it is diagonal across the Floor.
  • 27. 3. Duplicate the wall three times and change the Transform Component values as shown below. Wall (1) GameObject Wall (3) GameObject Wall (2) GameObject
  • 28. You will now have 4 walls at 45 degrees.
  • 29. 6.Create the roof 1. Create a new empty GameObject as a child of the Monument GameObject and name it Platform.
  • 30. 2. Drag all the floor objects into the Platform GameObject. This creates what is called a nested GameObject, in which objects are nested at multiple levels as children of one GameObject. In this case, the Monument GameObject is the parent, and all the Floor GameObjects are its children. When you group objects together like this, you can manipulate them all together and make copies of the whole group while still maintaining the relationships between them.
  • 31. 3. Duplicate the Platform GameObject. The duplicate Platform will include duplicate child objects. Rename this copy of Platform to Roof. 4. Select the Roof and use the Move and Rotate tools to put the roof onto the structure. Try positioning the Roof in the Scene view without changing the numbers in the Transform Component, but when you are done, the numbers should look like the ones shown below.
  • 32. You have created a monument in Unity! Along the way you learned some new concepts and practiced some old ones, such as: ● Creating an empty GameObject as a container for other GameObjects. ● Duplicating GameObjects. ● Using the Transform Component to manipulate child GameObjects. ● Nesting GameObjects to multiple levels. ● Using the Move and Rotate tools to transform a child GameObject. Next, you will get a glimpse of the power you have over your GameObjects by doing more with components.
  • 33. Summary In this tutorial, you will see how components add functionality to GameObjects. The component you will see in action here, the RigidBody Component, lets a GameObject behave like a physical object instead of floating in space. In this tutorial, you will: ● Position the Main Camera to display action in the Game view. ● Explore the relationship between GameObjects and components. ● Identify specific components in the Inspector window. ● Add physical properties to a 3D GameObject by applying the RigidBody component and setting its properties. ● Enter Play mode to preview a Scene in the Game view. ● Experiment with 3D physics in Unity.
  • 34. 1.Overview Components add behaviors and functionality to a GameObject. You have used the Transform Component — and that is just the beginning! In this tutorial, you will add another component, the RigidBody Component, which gives a GameObject physical properties so that it can interact with gravity and other GameObjects. You will also position the Main Camera to watch how a GameObject responds to gravity in 3D.
  • 35. 2.Before you begin 1. Create a new Sphere GameObject in the Hierarchy.
  • 36. 2. Move the sphere to the space inside the Monument, so that it is positioned in “mid-air” above the steps. You can use the Transform tools, the Transform Component in the Inspector, or both.
  • 37. 3.Position the Main Camera In every new Scene, there is a camera like the one shown below.
  • 38. This camera, named Main Camera in the Hierarchy, captures and displays your Scene to the player as it appears in the Game view. While the Scene view is where you build Scenes, the Game view is a preview of the way your game appears to the player. The camera in your Scene is a GameObject like any other. When you select it, you will see its Transform Component in the Inspector window. You can change these settings as you would with any other GameObject. Note that scaling a camera will have no effect. When you select a camera, you see the outlines of a pyramid-like shape called the frustum. The frustum shows you what part of your Scene the camera is viewing. Anything outside the frustum is not visible to the camera.
  • 39. When a camera is selected (1), you can expand the Camera Component in the Inspector (2) to open a Camera Preview window (3) that shows you what is visible to the camera in the Scene.
  • 40. Move the camera to a position where it can “see” the ball and the steps below it. Tip: You can also move the camera to align with your current scene view by selecting it in the Hierarchy window and then pressing Ctrl+Shift+F. Select the play button to run the game. Notice that nothing is happening at the moment. This is because you still need to apply a component to the sphere to tell it how it needs to interact with the physics of the game. In this case, you need to make it solid so that it reacts to gravity.
  • 41. 4.Make the sphere solid Remember when you created a sphere that was inside a cube? Objects in the physical world don’t exist inside other objects that way, but in a Unity Scene, by default, GameObjects don’t have mass or respond to gravity. To make a GameObject behave like a real-world physical object, you can give it physical properties by adding a RigidBody Component. To add the RigidBody Component to the Sphere GameObject: 1. In the Hierarchy window, select the Sphere. 2. Select the Add Component button in the Inspector window.
  • 42. 3. Use the search bar to find a Rigidbody component and select it. Note that there are two options available, Rigidbody and Rigidbody 2D. Make sure you select the Rigidbody component, not the 2D one.
  • 43. 4. In the RigidBody Component in the Inspector, select Use Gravity if it is not already selected. 5. To see the effect of these properties, start the game by pressing the Play button, which will display the Game view. The ball falls and rolls down the steps. If it does not roll, try moving it to a new position using the transform tools and run the game again. Note: for Physics Best Practises see this Tutorial for more information.
  • 44. 5.Experiment with falling GameObjects Try variations of this exercise. Move the Sphere GameObject and the Main Camera to get the results you want. More things to try: ● Add more spheres with RigidBody Components at varying heights. ● Add other primitives and see how they behave. ● Drop objects in different places. ● Rotate the Monument GameObject. One thing to note is that you can change the properties, values and position of a selected GameObject while the game is running, but when the game is stopped all values will revert back to what they were before the game was started. This is useful to test different parameters during runtime, but if you want the changes to be permanent, you need to make the changes while the game is stopped.
  • 45. Summary In this tutorial, you’ll explore some visual and physical effects you can achieve in a 3D Scene. You will: ● Create and configure a new Material to add visual properties to a GameObject. ● Create and configure a Physic Material to add physical properties to a GameObject. ● Configure the directional light. Materials Herringbone_Brick_baseColor.png
  • 46. 1.Overview Materials are components that define the surface characteristics of objects, and how those surfaces interact with light. In each new 3D Scene, directional light is included to simulate the sun. In this tutorial, you will create a simple Material to change the visual appearance of a GameObject, and use a Material to change physical properties as well. The directional light will bounce off the GameObject with its Material to create a visually realistic effect.
  • 47. 2.Before you begin The visual appearance of the Material will come from an image file. You can download the file used in the steps below, Herringbone_Brick_baseColor.png, by selecting Tutorial Materials in the masthead at the top of this tutorial.
  • 48. 3.Import an image file 1. To make your Unity windows match the examples below, right-click the tab of the Project window and select Two Column Layout if it is not selected already. The folders of your project appear in the left column, and the contents of the selected folder appear in the right column. 2. Right-click the Assets folder in the Project window and select Create > Material.
  • 49. 3. Rename the new Material as BrickMaterial. The preview of the new Material is a 3D sphere, so that you can see how light interacts with the Material at many angles. When you select the Material in the Project window, a more accurate preview appears in a resizable pane of the Inspector. 4. Download the file Herringbone_Brick_baseColor.png from the Files listed at the beginning of this tutorial, or go to this URL: https://connect-prd- cdn.unity.com/20201001/26e9117a-554a-406c- 824e- a4fa4e649738/Herringbone_Brick_baseColor.png ?_ga=2.232157087.1042105687.1641258304- 2084102660.1641258304
  • 50. 5. To import the file into the project, you can simply move the downloaded file to the Assets folder for this Unity project, which is represented in the Project window. To see the contents of the Assets folder in your file explorer, right-click the Assets folder and select Show in Explorer.
  • 51. 6. In your computer’s file explorer, move the Herringbone_Brick_baseCo lor.png file into your Assets folder. When you return to Unity, you will see its icon.
  • 52. 4.Create the Brick Material 1. Select the BrickMaterial. 2. In the Inspector window, select the circle icon next to the Albedo property. Albedo encompasses the reflective properties of the Material, based on a solid color or an image. 3. Select Herringbone_Brick_baseColor from the list of images in your project. The image is now applied to the material as the Albedo map, and will appear in the Material preview.
  • 53. 4. Create a new cube GameObject in the Scene. 5. Drag the material onto the cube in the Scene view.
  • 54. 6. The cube now displays the brick Material.
  • 55. 7. To change the scale of the Material, select the cube, open the BrickMaterial Component in the Inspector, and change the Tiling X and Y properties. Smaller numbers make the bricks appear larger.
  • 56. 5.Adding a Physic Material Earlier, you added a Rigidbody component to a GameObject to give it physical properties. You can also add additional physical characteristics with another type of Material called Physic Materials. With Physic Materials, you can make an object bounce and change its friction and drag properties.These properties take effect when the object is under the effects of gravity. Physic Materials don’t change the visual properties of the GameObject’s mesh. 1. In the Project window, create a new folder called Materials. Right-Click in the Materials folder in the Assets window and select Create > Physic Material. 2. Rename the material to BouncyBall.
  • 57. 3. Select the new Physic Material. 4. Change the Bounciness value to 1 in the Inspector window. 5. Select the cube. In the Inspector window, select Add Component and add a RigidBody component.
  • 58. 6. Your cube should already have a Box Collider component added to it. This component is automatically added when you create the cube in the scene. Drag the new Bounce physics material you created earlier into the Material slot in the Box Collider component. 7. Run the game. Your cube should now fall to the platform and have a bit of bounce when it hits the floor. 8. Experiment with your bouncy cube: try rotating it, duplicating it, and making cubes fall on top of each
  • 59. 6.Adjusting the Lighting in the scene In a new 3D Scene, an object named Directional Light is included to simulate sunlight. You can manipulate this light with transform tools like any other GameObject. 1. Select the Directional Light in the Hierarchy window. 2. Change the rotation of the light using the transform tools Move (shortcut key “w”) and Rotate (shortcut key “e”). Directional lights simulate a light source that bathes the entire scene in light coming from a specific direction. Changing the position of the light will not have an influence on the scene but changing the rotation will change the angle of the light in the Scene. Take note of how the sky and ambient light changes as you change the angle of the light. Directional light is just one type of light. If you are interested in other types, see Types of light.
  • 60. 7.Next steps In this tutorial, you have seen how Materials and light work together to make GameObjects look visually realistic. You also used a Material to add physical properties to a GameObject, and you adjusted the directional light. In real-world applications, however, you will need more than spheres and cubes. In the next tutorial, you will see how to get more sophisticated GameObjects into your projects without having to build them from scratch.
  • 61. Summary In this tutorial, we’ll explain sources of 3D assets: assets made with Digital Content Creation (DCC) tools or procured from the Unity Asset Store. We will walk through the steps for using the Asset Store to get assets you will need for the tutorial following this one. In this tutorial, you’ll be able to: ● Explain the content creation tools that support real-time 3D production ● Navigate to the Asset Store in a web browser ● Search and filter a search in the Asset Store ● Import an asset from the Asset Store automatically via a Unity account ● Materials Video Transcript - Get 3D Assets.zip
  • 62. 1.Overview The Unity Engine is where assets come together to make interactive experiences, but it is not necessarily where those assets are made. This tutorial explains how 3D assets are built using 3D Digital Content Creation tools (3D DCCs), and how you can get assets built with these tools from the Unity Asset Store. We’ll show you how to import some assets that will be useful in the challenge for this learning project.
  • 63. The 3D assets made in DCCs are brought into a real-time engine such as Unity, where they are integrated into a larger project like a game, simulation, or animated film. 2.What are 3D DCCs? 3D Digital Content Creation tools (DCCs) such as Maya, ZBrush, and Blender allow artists to create environments, models, and characters in three dimensions. In these programs, artists model the shape of a 3D object, rig it so that it can be animated, animate it to move in a particular way, and texture it to give it color and shading. An example of this is shown below.
  • 64. 3.Other resources for 3D assets in Unity It is possible to create 3D art and environments within the Unity editor using a tool called ProBuilder. Probuilder has limited functionality compared to dedicated DCCs, but it is helpful for artists who want to quickly model 3D objects without opening an external editing tool. Not everyone has the time to learn a 3D DCC or the budget to hire someone to create 3D art for them, but there are many online resources for obtaining high quality assets. In addition to sites like CGTrader and Turbosquid, which offer 3D models for all purposes, the Unity Asset Store is an invaluable resource for art specifically designed with Unity in mind.
  • 65. 4.Exercise Creating 3D art is a laborious, time-intensive practice that requires patience and dedication. To gain an understanding of this practice, search online for a video of “speed art” using the DCC tool of your choice. Speed art is a genre of online video content in which a recording of someone’s artistic process is sped up so you can appreciate all the work that went into it. Watch one of these videos and consider: was anything about the process surprising? Share your observations in the comments.
  • 66. 5.Get assets from the Asset Store You can take advantage of the talent, time, and effort it takes to create 3D assets by visiting the Unity Asset Store. The Asset Store is a convenient platform for specialized asset creators to share or sell their work, and for real-time creators to find pre-designed, pre- built assets that are ready to use. These assets include 3D models, Materials, animations, loading screens, scripts, and anything else you might need for your project. 1. Go to the Unity Asset store (this link will open in your default browser) and log in with your Unity ID. Hint: Anything you acquire through the Asset Store will be linked to your Unity account and will be available in the Editor as long as you are signed in with the same Unity ID. 2. In the Asset Store search tab, type “materials” to search for available Material assets. 3. In the Pricing section of the filter panel, select Free Assets. 4. Select a free asset package containing Materials. We recommend Yughues Free Ground Materials. Be sure to find assets that are compatible with the version of Unity you are using. 5. For complete and up-to-date instructions on downloading and importing your assets into your project, refer to Import assets from the Asset Store.
  • 67. 6. Select one of the Materials and drag it onto the ground platform. The Material is now added to your GameObject.
  • 68. 6.Next steps In this tutorial, you witnessed the role of the Asset Store in the Unity ecosystem, and you downloaded and imported free assets. Next, we encourage you to use those assets — or others you might find in the Asset Store — to complete a challenge assignment on your own.
  • 69. Summary It’s time to put your new skills to the test! In this challenge assignment, you will create a track for a ball to roll on without touching the floor. Make your track as long as you dare, but don’t let the ball drop, because the floor is lava. When you’ve finished, you’ll be able to submit your work, and see what others have submitted.
  • 70. 1.Overview In this challenge, you will build your own Scene using primitive GameObjects and free assets. In the process of meeting this challenge, you will: ● Create a new 3D Scene. ● Create new primitives. ● Navigate 3D space in the Scene view. ● Move, rotate, and scale GameObjects. ● Move and rotate the Main Camera. ● Add a RigidBody Component to a GameObject. ● Create and apply new Materials. ● Playtest your game in the Game view.
  • 71. 2.Build your Scene A few instructions are provided below, but the creative part is all up to you. 1. Start a new Unity project using the 3D Template. 2. If you want to use imported assets, import them using the same process covered previously under Importing an image. 3. Using Unity primitives and any imported assets, create a path for a ball to roll from one location to another without falling or touching the floor. Tip: Start by creating a floor object and then using other assets and primitives to lay out your Scene. 4. Import materials from the Unity Asset Store or create your own to give your Scene some life. 5. Using the same steps covered previously under Make the sphere solid, add RigidBody components to the relevant elements in your Scene until the ball can roll down your track. 6. Position the Main Camera to find a good viewpoint. 7. Run the Scene to test it, and make adjustments as necessary until the ball runs through the whole track you created. 8. Apply any other skills you have learned to make the Scene uniquely your own. Note: Be sure to save your entire project by selecting File > Save Project, or by selecting Save when you exit the Unity Editor. We will come back to this project later.
  • 72. 3.Next steps Did you make the ball bounce? Did you make the floor lava? Or did you go in a different direction? Whatever you have created, we’d like for you to share it with the Unity Learn community — but first, you will have to build your project to be playable. That’s the next tutorial.
  • 73. Summary Let’s see what you’ve made! In this tutorial, you’ll: ● Set the platform for a build of a Unity project ● Create a basic build of a Unity project. ● Share your project with the Unity Learn community. To complete the requirements for this Mission, submit your 3D project to the gallery in this tutorial. (You may share it with others or keep it private.)
  • 74. 1.Overview When your game is ready, it is time to create a build, which is a standalone, playable version of your game. Unity supports most popular platforms, including mobile (Android and iOS), which allows you to quickly publish your project with a few simple clicks. Keep in mind that while it is easy to publish to different platforms, it is up to you, the game developer, to make sure that your game can run on the target platforms. For example, the resources available on a smartphone are vastly different than those on a Playstation. Just because you can build for a platform, your game will not necessarily run on that platform. In this tutorial, you will create and publish a WebGL build so that you can share your project on the web with the Unity Essentials community and your fellow creators, if you like. You can publish your WebGL build on Unity Play or use other hosting platforms.
  • 75. 2.Submit your project You’re going to create a build that others can play online — a WebGL build is the best fit for that. The process broadly is the same for publishing to any other platform such as Windows, Linux or MacOS. To make your submission: 1. Follow these steps to create and publish a WebGL build of your Unity project. 2. Once you’ve done that, then use the form below to submit your project to Unity Learn. Important: The submission is required to complete this mission of the Unity Essentials pathway.