기술 자료

Unity Engine

Unity Engine

GetWorldRect()

Returns the world-space axis-aligned bounding box of this RectTransform.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public Rect GetWorldRect()

Returns

Type

Description

RectA Rect describing the world-space bounding box. Width and height are always non-negative.

Remarks

The returned Rect is the smallest axis-aligned rectangle that encloses all four world-space corners of this RectTransform. For a RectTransform with non-zero Z rotation, the bounding box is larger than the element's nominal size.
Additional Resources: GetScreenRect, RectTransform.Contains.