using System.Collections; using System.Collections.Generic; using UnityEngine; public class SpriteSize : MonoBehaviour { public float A = 2; public float x = 660; public bool ADD_Calibration = false; // Use this for initialization void Start () { float B = (float)Screen.width / Screen.height; float y = B * x / A; //gameObject.GetComponent().width = (int)(y * (ADD_Calibration ? B / A : 1f)); enabled = false; } /*// Update is called once per frame void Update () { }*/ }