Version: 2020.1
언어: 한국어
public float width ;

설명

The width of the rectangle, measured from the X position.

Setting this value will also change xMax.

using UnityEngine;

public class RectExample : MonoBehaviour { // Use this for initialization void Start() { Rect rect = new Rect(10, 10, 50, 30); Debug.Log("width = " + rect.width); // prints: width = 50 rect.width = 20; Debug.Log("new max x = " + rect.xMax); // prints: new max x = 30 } }