Version: Unity 6 Beta (6000.0)
Language : English
Asynchronous programming
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.
Asynchronous programming
GameObject
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961