using System.Collections;
using System.Collections.Generic;
using UnityEngine;

//	Summary
//		* object를 screen size에 맞게 크기를 재조정한다.

namespace GameUtility
{
	/*
		Object resizer
 	*/
	public class ObjectResizer : MonoBehaviour
	{

		public float baseWidth	= 320f;
		public float baseHeight	= 480f;
		// Use this for initialization
		void Start ()
		{
			float defaultAspect	= baseWidth / baseHeight;
			float windowAspect	= (float)Screen.width / (float)Screen.height;
			float aspect = windowAspect / defaultAspect;
			// float aspect		= (float)Screen.width / baseWidth;
			Vector3 origin = transform.localScale;

			transform.localScale	= origin * aspect;
		}
	
		// Update is called once per frame
		void Update ()
		{
		
		}
	}
}
