application.logcallback 日志回调

2014-12-31 08:42| 发布者: 杨炎| 查看: 2952| 评论: 0|原作者: 蛮牛|来自: yzc88亚洲城脚本manual

摘要: application.logcallback 日志回调delegatelogcallback(condition: string,stacktrace: string,type:logtype) : voiddescription描述use this delegate type with registerlogcallback to monitor what gets logged. ...

application.logcallback 日志回调

delegatelogcallback(condition: string,stacktrace: string,type:logtype) : void

description描述

use this delegate type with registerlogcallback to monitor what gets logged.

用registerlogcallback来使用这个委托类型,去监控什么得到记录了

c#

javascript

using unityengine;

using system.collections;

public class example :monobehaviour{

public string output = "";

public string stack = "";

void onenable() {

application.registerlogcallback(handlelog);

}

void ondisable() {

application.registerlogcallback(null);

}

void handlelog(string logstring, string stacktrace, logtype type) {

output = logstring;

stack = stacktrace;

}

}

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;

}

参见:application.registerlogcallback,logtype

相关阅读

文章点评
相关文章