using UnityEngine;
using System.Collections;
public class CameraController : MonoBehaviour {
public float backgoundWidthInpixel;
// Use this for initialization
void Start () {
float backgoundWidth = backgoundWidthInpixel/100; //100 is the pixels to unit value
float retio =(float) (Screen.width)/(float) (Screen.height);
float newSize = backgoundWidth/retio;
camera.orthographicSize = newSize/2;
}
// Update is called once per frame
void Update () {
}
}