Manual     Reference     Scripting  
  
Scripting > Runtime Classes > Object   
  • Menu
  • Overview
  • Runtime Classes
  • Attributes
  • Enumerations
  • Editor Classes
  • Enumerations
  • History
  • Index
  • Object
  • All Members
  • Variables
  • hideFlags
  • name
  • Functions
  • GetInstanceID
  • Class Functions
  • Destroy
  • DestroyImmediate
  • DontDestroyOnLoad
  • FindObjectOfType
  • FindObjectsOfType
  • Instantiate
  • operator !=
  • operator ==
  • operator bool

Object.operator ==  

static operator == (x : Object, y : Object) : bool

Description

Compares if two objects refer to the same

var target : Collider;
function OnTriggerEnter (trigger : Collider)
{
if (trigger == target)
print("We hit the target trigger");
}
var target : Transform;
function Update ()
{
// Early out if the target is gone
if (target == null)
return;
}