Legacy Documentation: Version 4.6(go to latest)
Language: English
  • C#
  • JS
  • Boo

Script language

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

Selection.Contains

public static function Contains(instanceID: int): bool;
public static function Contains(obj: Object): bool;

Description

Returns whether an object is contained in the current selection.

	if (Selection.Contains (gameObject))
		Debug.Log ("I'm selected!");