Version: 2019.4
ゲームオブジェクト
コンポーネントの使用

コンポーネントへの入門

A GameObject is an object in the Unity Editor which contains components. Components define the behaviour of that GameObject.

This page describes how to view and interact with components, and provdes a brief overview of the most common component configurations in Unity.

To view a GameObject’s components, select the GameObject in the Scene window or Hierarchy window, then see the Inspector window for a list of all components and their settings.

You can interact with components directly in the Editor, or through script. See the Scripting section for guidance on how to control and interact with components through script.

Common component configurations

This section details some fundamental default component configurations in Unity.

Transform component

新しい空のゲームオブジェクトのインスペクター。 Transform コンポーネントを表示します。
新しい空のゲームオブジェクトのインスペクター。 Transform コンポーネントを表示します。

Every GameObject in Unity has a Transform component. This component defines the GameObject’s position, rotation, and scale in the game world and Scene view. You cannot remove this component.

The Transform component also enables the concept of parenting, which allows you to make a GameObject a child of another GameObject and control its position via the parent’s Transform component. This is a fundamental part of working with GameObjects in Unity.

Main Camera GameObject components

The Main Camera GameObject
The Main Camera GameObject

By default, every new Scene starts with a GameObject called Main Camera. This GameObject is confugured to act as the primary camera in your game. It contains the Transform component, the Camera component, and an Audio Listener to pick up audio in your application.

ゲームオブジェクト
コンポーネントの使用