The camera's aspect is consistent with screen by default and can be set to the specified value by script, as follows:
Using Unityengine;
Using System.Collections;
public class Makecameraviewwequalsh:monobehaviour {
Use this for initialization
void Start () {
Gameobject.getcomponent<camera> (). aspect = 0.1f;
}
Update is called once per frame
void Update () {
}
}
At this point the camera's aspect is set to 1, except that the camera viewport shape changes even in the run-time editor. To see what Aspect=1 is, at present I know the method can only be the game viewport of the aspect ratio set to a temporary look at the correctness, confirm the correct later to adjust the game viewport aspect ratio recalled to the original value. While the viewport shape of the camera appears to be incorrect in the editor, the rendering is correct.
Unity Camera Aspect