how to get a new main camera in unity 2d code example
Example: how to make a camera follow an object in unity 2d
public Transform player; public Vector3 offset; void Update () { transform.position = new Vector3 (player.position.x + offset.x, player.position.y + offset.y, offset.z); // Camera follows the player with specified offset position }