Selection.Contains Manual     Reference     Scripting  
Scripting > Editor Classes > Selection
Selection.Contains

static function Contains (instanceID : int) : boolean

static function Contains (obj : Object) : boolean

Description

Returns whether an object is contained in the current selection.

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