Application.LogCallback

delegate LogCallback (condition : String, stackTrace : String, type : LogType) : void

Description

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

JavaScript
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;
}

See Also: Application.RegisterLogCallback, LogType