文档

Unity Engine

Unity Engine

height

The height of the rectangle, measured from the Y position.
阅读时间1 分钟最后更新于 1 天前

Definition

public float height { get; set; }

Remarks

Setting this value will also change Rect.yMax.

Examples

using UnityEngine;public class Example : MonoBehaviour{ void Start() { Rect rect = new Rect(0, 0, 10, 10); print(rect.height); rect.height = 20; }}