Application.LogCallback Manual     Reference     Scripting  
Scripting > Runtime Classes > Application
Application.LogCallback

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

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

See Also: Application.RegisterLogCallback, LogType