文档

Unity Engine

Unity Engine

orthographicSize

Projection's half-size when in orthographic mode.
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
警告
Deprecated. Projector component is deprecated now that the Built-In Render Pipeline is deprecated. To use an alternative, refer to the documentation in the component help icon. #from(6000.5)
public float orthographicSize { get; set; }

Remarks

This is half of the vertical size of the projection volume. Horizontal projection size varies depending on Projector.aspectRatio. Orthographic size is ignored when projection is not orthographic (see Projector.orthographic). Additional Resources: projector component.

Examples

using UnityEngine;public class Example : MonoBehaviour{ void Start() { Projector proj = GetComponent<Projector>(); proj.orthographic = true; proj.orthographicSize = 2.0f; }}