An example Unity script in C# to allow a player to move and look around with the mouse when the player has a CharacterController attached to it.
The camera must be attached to the player, otherwise the script will have to be modified to rotate both separately.