Rect.width 宽度

var width : float

Description描述

Width of the rectangle.

矩形的宽度。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	public Rect rect = new Rect(0, 0, 10, 10);
	public void Awake() {
		print(rect.width);
		rect.width = 20;
	}
}
var rect = Rect (0, 0, 10, 10);
print(rect.width);
rect.width = 20;
Page last updated: 2010-12-21