Version: 2017.1
Scenes
GameObject

GameObjects

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.

Four different types of GameObject: an animated character, a light, a tree, and an audio source
Four different types of GameObject: an animated character, a light, a tree, and an audio source

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.

You can think of a GameObject as an empty cooking pot, and components as different ingredients that make up the recipe of your game. Unity has lots of different built-in component types, and you can also make your own components using the Unity Scripting API.

This section explains how GameObjects, components and the Scripting API fit together, and how to create and use them.


Scenes
GameObject
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961