Skip to content

Instantly share code, notes, and snippets.

@sdabet
sdabet / AspectRatioScript.cs
Created January 21, 2015 12:56
Aspect ratio script for Unity
using UnityEngine;
using System.Collections;
public class AspectRatioScript : MonoBehaviour {
public float targetAspect;
void Start ()
{
float windowAspect = (float)Screen.width / (float)Screen.height;