Game Object Types:
The GameObject is the most important concept in the Unity Editor.
Every object in your game is a GameObject, from characters and collectible items to lights, cameras
and special effects. However, a GameObject can’t do anything on its own; you need to give it properties before it can become a character, an environment, or a special effect.
Every object in your game is a GameObject, from characters and collectible items to lights, cameras
and special effects. However, a GameObject can’t do anything on its own; you need to give it properties before it can become a character, an environment, or a special effect.
Four different types of GameObject: an animated character, a light, a tree, and an audio source:
Game Object Properties:
GameObjects are the fundamental objects in Unity that represent characters, props and scenery.
They do not accomplish much in themselves but they act as containers for Components, which implement the functionality. To give a GameObject the properties it needs to become a light, or a tree, or a camera, you need to add components to it. Depending on what kind of object you want to create, you add different combinations of components to a GameObject. Unity has lots of different built-in component types, and you can also make your own components using the Unity Scripting API. For example, a Light object is created by attaching a Light component to a GameObject. |
Transforming Game Objects:
The Transform is used to store a GameObject’s position, rotation, scale and parenting state and is thus very important.
A GameObject will always have a Transform component attached - it is not possible to remove a Transform component determines the Position, Rotation, and Scale of each object in the scene. |
Property: Function: Position
Position of the Transform in X, Y, and Z coordinates.
Rotation - Rotation of the Transform around the X, Y, and Z axes, measured in degrees.
Scale - Scale of the Transform along X, Y, and Z axes. Value “1” is the original size (size at which the object was imported).
Position of the Transform in X, Y, and Z coordinates.
Rotation - Rotation of the Transform around the X, Y, and Z axes, measured in degrees.
Scale - Scale of the Transform along X, Y, and Z axes. Value “1” is the original size (size at which the object was imported).
A Transform can be edited in the Scene View or by changing its properties in the Inspector. In the scene, you can modify Transforms using the Move, Rotate and Scale tools. These tools are located in the upper left-hand corner of the Unity Editor.
The View, Translate, Rotate, and Scale tools
The tools can be used on any object in the scene. When you click on an object, you will see the tool gizmo
appear within it. The appearance of the gizmo depends on which tool is selected.
appear within it. The appearance of the gizmo depends on which tool is selected.
Before you start adding any "objects" start with a plane for them to sit on.
Add Terrain:
Step 1. Open a New Unity Document
Step 2. On the top left of your screen, click the "Game Object" option > 3D Object > Terrain Step 3. Look at the Inspector on the right. Step 4. Select the leftmost icon and raise the height of the landscape (holding shift allows you to lower it back down).In this step you change change the size and strength of the brush tool. Step 5. Save a texture file or download one. Step 6. Inspector > Edit Textures > Add Texture It will automatically drop in that texture for everything. Step 7. Adjust small parts of the texture by painting them by hand. |
|