Manual     Reference     Scripting  
  
Scripting > Runtime Classes > Debug   
  • Menu
  • Overview
  • Runtime Classes
  • Attributes
  • Enumerations
  • Editor Classes
  • Enumerations
  • History
  • Index
  • Debug
  • All Members
  • Class Variables
  • isDebugBuild
  • Class Functions
  • Break
  • DrawLine
  • DrawRay
  • Log
  • LogError
  • LogWarning

Debug.Log  

static function Log (message : object) : void

Description

Logs message to the Unity Console.

Debug.Log ("Hello");

static function Log (message : object, context : Object) : void

Description

Logs message to the Unity Console.

When you select the message in the console a connection to the context object will be drawn. This is very useful if you want know on which object an error occurrs.

Debug.Log ("Hello", gameObject);