Manual     Reference     Scripting  
  
Scripting > Editor Classes > Selection   
  • Menu
  • Overview
  • Runtime Classes
  • Attributes
  • Enumerations
  • Editor Classes
  • Enumerations
  • History
  • Index
  • Selection
  • All Members
  • Class Variables
  • activeGameObject
  • activeInstanceID
  • activeObject
  • activeTransform
  • gameObjects
  • instanceIDs
  • objects
  • transforms
  • Class Functions
  • Contains
  • GetFiltered
  • GetTransforms

Selection.Contains  

static function Contains (instanceID : int) : bool

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!");