ドキュメント

Unity Engine

Unity Engine

aspect

The aspect ratio (width divided by height).
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

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
aspect
ratio of the camera, the value will stay until you call camera.ResetAspect(); which resets the aspect to the screen's aspect ratio.
Additional Resources: camera component, Screen class.