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.

HandleUtility.PickRectObjects

static function PickRectObjects(rect: Rect): GameObject[];
static GameObject[] PickRectObjects(Rect rect);
static def PickRectObjects(rect as Rect) as GameObject[]

Parameters

rectAn screen rectangle specified with pixel coordinates.

Description

Pick GameObjects that lie within a specified screen rectangle.

This is useful for implementing multi-select tools that allow the user to drag a rectangle around the desired objects.