using UnityEngine;
using System.Collections;


[ExecuteInEditMode]
public class CamSizeUpdate : MonoBehaviour {


	float h = -1;

	void Start () {
		
	}
	

	void Update () {

		float new_h = Screen.height;

		if(h != new_h){
			h = new_h;
			float scale = (h / 2f) / 1f;
			
			Camera c = gameObject.GetComponent<Camera>();
			
			c.orthographicSize = scale;
//			print(scale);
//			print("x");
		}

	}
}
