Application.RegisterLogCallbackstatic function RegisterLogCallback (handler : Application.LogCallback) : voidDescriptionRegister a delegate to be called on log messages. Pass null to remove log handler. 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.LogCallback, LogType. |
