aspect
The aspect ratio (width divided by height).
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Property
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
public float aspect { get; set; }
Remarks
By default the aspect ratio is automatically calculated from the screen's aspect ratio, even if the camera is not rendering to full area. If you modify the ratio of the camera, the value will stay until you call camera.ResetAspect(); which resets the aspect to the screen's aspect ratio.
aspectAdditional Resources: camera component, Screen class.