Introduction to C# in Unity

This section explains the basics of C# (pronounced see-sharp) scripting in Unity. It is not intended to be a proper tutorial on how to learn programming, but rather it is used as a point of reference for the documentation of My Unity Assets so that these concepts do not need to be repeated all over the place.

There is a lot to learn about programming, so this site tries to explain the parts that are most relevant in Unity. It has many links to the Unity Manual and C# Documentation. Even experienced programmers need to frequently refer to these resources and search online to learn new things.

You might also find the Unity Learn website useful.

Scripting Overview A general summary of how scripting works in Unity.
Organization The ways of structuring your scripts.
Variables Data, values, and references.
Methods The actual executable functions of a program.
Inheritance Writing reusable modular code using polymorphism and composition.
Vectors Vector math and physics raycasting.
Other Topics Miscellaneous topics that do not fit in other sections.