Application翻译:^牛^魔王
- absoluteURL
- backgroundLoadingPriority
- CancelQuit
- CanStreamedLevelBeLoaded
- CaptureScreenshot
- dataPath
- ExternalCall
- ExternalEval
- GetStreamProgressForLevel
- internetReachability
- isEditor
- isLoadingLevel
- isPlaying
- isWebPlayer
- levelCount
- loadedLevelName
- loadedLevel
- LoadLevelAdditiveAsync
- LoadLevelAdditive
- LoadLevelAsync
- LoadLevel
- LogCallback
- OpenURL
- persistentDataPath
- platform
- Quit
- RegisterLogCallbackThreaded
- RegisterLogCallback
- runInBackground
- srcValue
- streamedBytes
- systemLanguage
- targetFrameRate
- temporaryCachePath
- unityVersion
- webSecurityEnabled
Application.LogCallback 日志回调
delegate LogCallback (condition : string, stackTrace : string, type : LogType) : void
Description描述
Use this delegate type with RegisterLogCallback to monitor what gets logged.
用RegisterLogCallback来使用这个委托类型,去监控什么得到记录了
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;
}
最后修改:2011年7月20日 Wednesday 13:05