In this tutorial is explained how to use C# programming with Unity game engine. It is a tutorial for beginners to C# and to Unity.
You learn how to add and use scripts for Unity GameObjects and I describe the base class called Monobehavior that most classes that you implement for your Unity GameObjects have to derive from. This class has the methods Awake, Start and Update which have the following semantics:
This is called once for each GameObject when it is created.
This method is also called once for each GameObject, but after the Awake method, when the scene has started.
The method is used to implement behavior for your GameObjects, it is called for every frame of your game.
In the example project I added a rotation of a Cube GameObject to the Update method in the C# script.