Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Fundamental Unity types

Understand some of the fundamental C# types that Unity provides and their special significance and behavior in the Unity Editor and runtime.
Read time 1 minuteLast updated 7 days ago

Unity has some fundamental built-in classes that are particularly important for scripting. These are classes which your own custom types can inherit from to integrate with Editor and Engine functionality. It's helpful to understand these types, their behavior, and why you should inherit from or use them.
For a complete reference of all the built-in classes and every member available, refer to the Script Reference.

Topic

Description

Object
UnityEngine.Object
is the base class for all objects the Editor can reference from fields in the Inspector window.
MonoBehaviourInherit from
MonoBehaviour
to make your script a component and control the behaviour of GameObjects and make them responsive to events.
ScriptableObjectInherit from
ScriptableObject
to store data that's independent of GameObjects.
Unity attributesUse Unity-specific C# attributes to define special behavior for your code.

Additional resources