Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

RectOffset.RectOffset

RectOffset()
RectOffset();
def RectOffset()
RectOffset(left: int, right: int, top: int, bottom: int)
RectOffset(int left, int right, int top, int bottom);
def RectOffset(left as int, right as int, top as int, bottom as int)

Description

Creates a new rectangle with offsets.

	var rect = RectOffset (0, 10, 0, 10);
using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour {
    public RectOffset rect = new RectOffset(0, 10, 0, 10);
}
import UnityEngine
import System.Collections

public class ExampleClass(MonoBehaviour):

	public rect as RectOffset = RectOffset(0, 10, 0, 10)