Legacy Documentation: Version 5.6 (Go to current version)
Scenes
GameObject
Other Versions

GameObjects

The GameObject is the most important concept in the Unity Editor.

Every object in your game is a GameObject. This means that everything you can think of to be in your game has to be a GameObject. 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 GameObjects; an animated character, a light, a tree and an audio source
Four different types GameObjects; an animated character, a light, a tree and an audio source

A GameObject is a container; you add pieces to the GameObject container to make it into a character, a light, a tree, a sound, or whatever else you would like it to be. Each piece you add is called a component.

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 your recipe of gameplay. 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 Scripting API fit together, and how to create and use them.

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