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 a different object

var target : Transform;
function Update ()
{
// the target object does not refer to the same object as our transform
if (target != transform)
{
print("Another object");
}
}