Legacy Documentation: Version 5.0
Language: English
  • C#
  • JS

Script language

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

HandleUtility.PickGameObject

Switch to Manual
public static function PickGameObject(position: Vector2, selectPrefabRoot: bool): GameObject;
public static function PickGameObject(position: Vector2, out materialIndex: int): GameObject;

Parameters

selectPrefabRootSelect prefab.
materialIndexReturns index into material array of the Renderer component that is closest to specified position.

Description

Pick game object closest to specified position.