using System; using UnityEngine; namespace Leap.Unity { public class FitHeightToScreen : MonoBehaviour { private void Awake() { float num = (float)(base.GetComponent().texture.width / base.GetComponent().texture.height); float num2 = num * (float)Screen.height; float x = ((float)Screen.width - num2) / 2f; base.GetComponent().pixelInset = new Rect(x, 0f, num2, (float)Screen.height); } } }