Version: Unity 6 Preview (6000.0)
Language : English
Unity scripting fundamentals
GameObject

Important classes

This section provides an overview of the most commonly used and important built-in classes in Unity that you might want to use when scripting.

These pages serve as a starting point for the discovery of scripting basics in Unity. They do not cover all classes in Unity or every member of the classes which are covered.

For a complete reference of all the built-in classes and every member available, refer to the Script Reference.

Topic Description
GameObjectThe fundamental object in Unity scenes, which can represent characters, props, scenery, cameras, waypoints, and more. A GameObject’s functionality is defined by the Components attached to it. More info
See in Glossary
Represents the type of objects which can exist in a SceneA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info
See in Glossary
.
MonoBehaviour The base class for user-created components, which are attached to GameObjects to control their behavior.
Object The base class for all objects that Unity can reference in the Editor.
Transform Provides you with a variety of ways to work with a GameObject’s position, rotation and scale via script, plus its hierarchical relationship to parent and child GameObjects.
Vectors Classes for expressing and manipulating 2D, 3D, and 4D points, lines and directions.
QuaternionUnity’s standard way of representing rotations as data. When writing code that deals with rotations, you should usually use the Quaternion class and its methods. More info
See in Glossary
A class which represents an absolute or relative rotation, and provides methods for creating and manipulating them.
ScriptableObject A data container that you can use to save large amounts of data.
Time (and frame rate management) The Time class allows you to measure and control time, and manage the frame rate of your project.
Mathf A collection of common math functions, including trigonometric, logarithmic, and other functions commonly required in games and app development.
Random Provides you with easy ways of generating various commonly required types of random values.
Debug Allows you to visualise information in the Editor that can help you understand or investigate what is going on in your project while it’s running.
Gizmos and Handles Allows you to draw lines and shapes in the Scene viewAn interactive view into the world you are creating. You use the Scene View to select and position scenery, characters, cameras, lights, and all other types of Game Object. More info
See in Glossary
and Game view, as well as interactive handles and controls.
Unity scripting fundamentals
GameObject