camera follow

C#
public Transform player;

    public Vector3 offset;

    void LateUpdate()
    {
        transform.position = player.position + offset;
    }
Source

Also in C#: