Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


RectOffset

Offsets for rectangles, borders, etc.
Read time 1 minuteLast updated 5 days ago

Definition

public class RectOffset : IFormattable

Remarks

Used all over the place by GUIStyle.

Constructors

Constructor

Description

RectOffset()Creates a new rectangle with offsets.
RectOffset(System.Int32,System.Int32,System.Int32,System.Int32)Creates a new rectangle with offsets.

Properties

Property

Description

bottomBottom edge size.
horizontalShortcut for left + right. (Read Only)
leftLeft edge size.
rightRight edge size.
topTop edge size.
verticalShortcut for top + bottom. (Read Only)

Methods

Method

Description

AddAdd the border offsets to a rect.
RemoveRemove the border offsets from a rect.
ToStringReturns a formatted string for this RectOffset.