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.activeGameObject  

static var activeGameObject : GameObject

Description

Returns the active game object. (The one shown in the inspector)

It will also return game objects that might be prefabs or non-modifyable objects.