Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Application.LogCallback

Description

Use this delegate type with RegisterLogCallback to monitor what gets logged.

	var output = "";
	var stack= "";

function OnEnable () { Application.RegisterLogCallback(HandleLog); }

function OnDisable () { // Remove callback when object goes out of scope Application.RegisterLogCallback(null); }

function HandleLog (logString : String, stackTrace : String, type : LogType) { output = logString; stack = stackTrace; }