Initializes a new instance of the Logger.
private void Start() { _logger = new UnityEngine.Logger(new LabyrinthLogHandler()); _logger.Log(_tag, "SessionResultAnimation Start."); try { text = GetComponent <Text>(); if (Menu.SessionList == null) { text.text = "No Data"; return; } else if (Menu.SessionList.Sessions.Count != 0) { text.text = getLastObjectInformation(); } else { text.text = "No Data"; } } catch (System.Exception e) { _logger.LogException(e); } }
/// <summary> /// Creates a new Gateway with given settings. /// </summary> /// <param name="uOSSettings"></param> public UnityGateway(uOSSettings uOSSettings, Logger logger, UOSApplication app = null) { this.settings = uOSSettings; this.logger = logger; this.reflectionServiceCaller = new ReflectionServiceCaller(uOSSettings, this); this.app = app; }
static public int LogException(IntPtr l) { try { int argc = LuaDLL.lua_gettop(l); if (argc == 2) { UnityEngine.Logger self = (UnityEngine.Logger)checkSelf(l); System.Exception a1; checkType(l, 2, out a1); self.LogException(a1); pushValue(l, true); return(1); } else if (argc == 3) { UnityEngine.Logger self = (UnityEngine.Logger)checkSelf(l); System.Exception a1; checkType(l, 2, out a1); UnityEngine.Object a2; checkType(l, 3, out a2); self.LogException(a1, a2); pushValue(l, true); return(1); } pushValue(l, false); LuaDLL.lua_pushstring(l, "No matched override function to call"); return(2); } catch (Exception e) { return(error(l, e)); } }
public static void Log(string message, Logger logger, bool logInEditMode = false) { if (!logInEditMode && !Application.isPlaying) return; if (logged) return; if (logger != null) logger(message); logged = true; }
public Mummy(int id, GameObject mummy, Func <GameObject, GameObject> create) { _logger = new UnityEngine.Logger(new LabyrinthLogHandler()); _logger.Log(MummyClassName, "Mummy Creates."); _mummy = mummy; Id = id; create(_mummy); }
private void Start() { _logger = new UnityEngine.Logger(new LabyrinthLogHandler()); _logger.Log(_tag, "Score Start."); _session = GameObject.Find(Session.Session.sessionGameObjectName).GetComponent <Session.Session>(); _text = GetComponent <Text>(); }
public Zombie(int id, GameObject zombie, Func <GameObject, GameObject> create) { _logger = new UnityEngine.Logger(new LabyrinthLogHandler()); _logger.Log(ZombyClassName, "Zombie Creates."); _zombie = zombie; Id = id; create(_zombie); }
public GamePlayer(string name, float speed, GameObject player) { _logger = new UnityEngine.Logger(new LabyrinthLogHandler()); _logger.Log(_tag, "GamePlayer Creates."); TimeCreate = DateTime.Now; _coins = 0; _player = player; Name = name; Speed = speed; }
static public int get_logEnabled(IntPtr l) { try { UnityEngine.Logger self = (UnityEngine.Logger)checkSelf(l); pushValue(l, true); pushValue(l, self.logEnabled); return(2); } catch (Exception e) { return(error(l, e)); } }
private void Start() { _logger = new UnityEngine.Logger(new LabyrinthLogHandler()); _logger.Log(_tag, "Session Start."); _rand = new System.Random(); _coins = new List <IBonus>(); _enemies = new List <IEnemy>(); _timer = new Timer(5000); _timer.Elapsed += coinGeneratorControl; SessionStart = false; }
static public int get_filterLogType(IntPtr l) { try { UnityEngine.Logger self = (UnityEngine.Logger)checkSelf(l); pushValue(l, true); pushEnum(l, (int)self.filterLogType); return(2); } catch (Exception e) { return(error(l, e)); } }
static public int constructor(IntPtr l) { try { UnityEngine.Logger o; UnityEngine.ILogHandler a1; checkType(l,2,out a1); o=new UnityEngine.Logger(a1); pushValue(l,true); pushValue(l,o); return 2; } catch(Exception e) { return error(l,e); } }
static public int set_logEnabled(IntPtr l) { try { UnityEngine.Logger self = (UnityEngine.Logger)checkSelf(l); bool v; checkType(l, 2, out v); self.logEnabled = v; pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int set_filterLogType(IntPtr l) { try { UnityEngine.Logger self = (UnityEngine.Logger)checkSelf(l); UnityEngine.LogType v; checkEnum(l, 2, out v); self.filterLogType = v; pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static void Logger_filterLogType(JSVCall vc) { if (vc.bGet) { UnityEngine.Logger _this = (UnityEngine.Logger)vc.csObj; var result = _this.filterLogType; JSApi.setEnum((int)JSApi.SetType.Rval, (int)result); } else { UnityEngine.LogType arg0 = (UnityEngine.LogType)JSApi.getEnum((int)JSApi.GetType.Arg); UnityEngine.Logger _this = (UnityEngine.Logger)vc.csObj; _this.filterLogType = arg0; } }
static void Logger_logEnabled(JSVCall vc) { if (vc.bGet) { UnityEngine.Logger _this = (UnityEngine.Logger)vc.csObj; var result = _this.logEnabled; JSApi.setBooleanS((int)JSApi.SetType.Rval, (System.Boolean)(result)); } else { System.Boolean arg0 = (System.Boolean)JSApi.getBooleanS((int)JSApi.GetType.Arg); UnityEngine.Logger _this = (UnityEngine.Logger)vc.csObj; _this.logEnabled = arg0; } }
// fields // properties static void Logger_logHandler(JSVCall vc) { if (vc.bGet) { UnityEngine.Logger _this = (UnityEngine.Logger)vc.csObj; var result = _this.logHandler; JSMgr.datax.setObject((int)JSApi.SetType.Rval, result); } else { UnityEngine.ILogHandler arg0 = (UnityEngine.ILogHandler)JSMgr.datax.getObject((int)JSApi.GetType.Arg); UnityEngine.Logger _this = (UnityEngine.Logger)vc.csObj; _this.logHandler = arg0; } }
static public int IsLogTypeAllowed(IntPtr l) { try { UnityEngine.Logger self = (UnityEngine.Logger)checkSelf(l); UnityEngine.LogType a1; checkEnum(l, 2, out a1); var ret = self.IsLogTypeAllowed(a1); pushValue(l, true); pushValue(l, ret); return(2); } catch (Exception e) { return(error(l, e)); } }
static public int constructor(IntPtr l) { try { UnityEngine.Logger o; UnityEngine.ILogHandler a1; checkType(l, 2, out a1); o = new UnityEngine.Logger(a1); pushValue(l, true); pushValue(l, o); return(2); } catch (Exception e) { return(error(l, e)); } }
public static int LogFormat(IntPtr l) { int result; try { int num = LuaDLL.lua_gettop(l); if (num == 4) { UnityEngine.Logger logger = (UnityEngine.Logger)LuaObject.checkSelf(l); LogType logType; LuaObject.checkEnum <LogType>(l, 2, out logType); string format; LuaObject.checkType(l, 3, out format); object[] args; LuaObject.checkParams <object>(l, 4, out args); logger.LogFormat(logType, format, args); LuaObject.pushValue(l, true); result = 1; } else if (num == 5) { UnityEngine.Logger logger2 = (UnityEngine.Logger)LuaObject.checkSelf(l); LogType logType2; LuaObject.checkEnum <LogType>(l, 2, out logType2); UnityEngine.Object context; LuaObject.checkType <UnityEngine.Object>(l, 3, out context); string format2; LuaObject.checkType(l, 4, out format2); object[] args2; LuaObject.checkParams <object>(l, 5, out args2); logger2.LogFormat(logType2, context, format2, args2); LuaObject.pushValue(l, true); result = 1; } else { LuaObject.pushValue(l, false); LuaDLL.lua_pushstring(l, "No matched override function LogFormat to call"); result = 2; } } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int get_filterLogType(IntPtr l) { int result; try { UnityEngine.Logger logger = (UnityEngine.Logger)LuaObject.checkSelf(l); LuaObject.pushValue(l, true); LuaObject.pushEnum(l, (int)logger.filterLogType); result = 2; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int get_logEnabled(IntPtr l) { int result; try { UnityEngine.Logger logger = (UnityEngine.Logger)LuaObject.checkSelf(l); LuaObject.pushValue(l, true); LuaObject.pushValue(l, logger.logEnabled); result = 2; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public Coin(GameObject coin, Func <GameObject, GameObject> create) { try { _logger = new UnityEngine.Logger(new LabyrinthLogHandler()); _logger.Log(tag, "Coin " + _id + " Create."); _coin = coin; Id = id; id++; _coin.GetComponent <CoinUpdate>().Income = Income; create(_coin); } catch (System.Exception e) { _logger.LogException(e); } }
public static int LogError(IntPtr l) { int result; try { int num = LuaDLL.lua_gettop(l); if (num == 3) { UnityEngine.Logger logger = (UnityEngine.Logger)LuaObject.checkSelf(l); string tag; LuaObject.checkType(l, 2, out tag); object message; LuaObject.checkType <object>(l, 3, out message); logger.LogError(tag, message); LuaObject.pushValue(l, true); result = 1; } else if (num == 4) { UnityEngine.Logger logger2 = (UnityEngine.Logger)LuaObject.checkSelf(l); string tag2; LuaObject.checkType(l, 2, out tag2); object message2; LuaObject.checkType <object>(l, 3, out message2); UnityEngine.Object context; LuaObject.checkType <UnityEngine.Object>(l, 4, out context); logger2.LogError(tag2, message2, context); LuaObject.pushValue(l, true); result = 1; } else { LuaObject.pushValue(l, false); LuaDLL.lua_pushstring(l, "No matched override function LogError to call"); result = 2; } } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int set_filterLogType(IntPtr l) { int result; try { UnityEngine.Logger logger = (UnityEngine.Logger)LuaObject.checkSelf(l); LogType filterLogType; LuaObject.checkEnum <LogType>(l, 2, out filterLogType); logger.filterLogType = filterLogType; LuaObject.pushValue(l, true); result = 1; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int constructor(IntPtr l) { int result; try { ILogHandler logHandler; LuaObject.checkType <ILogHandler>(l, 2, out logHandler); UnityEngine.Logger o = new UnityEngine.Logger(logHandler); LuaObject.pushValue(l, true); LuaObject.pushValue(l, o); result = 2; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int set_logHandler(IntPtr l) { int result; try { UnityEngine.Logger logger = (UnityEngine.Logger)LuaObject.checkSelf(l); ILogHandler logHandler; LuaObject.checkType <ILogHandler>(l, 2, out logHandler); logger.logHandler = logHandler; LuaObject.pushValue(l, true); result = 1; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
static public int LogFormat__LogType__Object__String__A_Object(IntPtr l) { try { UnityEngine.Logger self = (UnityEngine.Logger)checkSelf(l); UnityEngine.LogType a1; checkEnum(l, 2, out a1); UnityEngine.Object a2; checkType(l, 3, out a2); System.String a3; checkType(l, 4, out a3); System.Object[] a4; checkParams(l, 5, out a4); self.LogFormat(a1, a2, a3, a4); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
private void Start() { _logger = new UnityEngine.Logger(new LabyrinthLogHandler()); _logger.Log(_tag, "SessionResultAnimation Start."); try { if (File.Exists(Path.Combine(Application.dataPath, "session_list.xml"))) { SessionList = SessionList.Load();//read data from xml } else { SessionList = new SessionList(); } } catch (System.Exception e) { _logger.LogException(e); } }
public static int IsLogTypeAllowed(IntPtr l) { int result; try { UnityEngine.Logger logger = (UnityEngine.Logger)LuaObject.checkSelf(l); LogType logType; LuaObject.checkEnum <LogType>(l, 2, out logType); bool b = logger.IsLogTypeAllowed(logType); LuaObject.pushValue(l, true); LuaObject.pushValue(l, b); result = 2; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
static public int LogFormat(IntPtr l) { try { int argc = LuaDLL.lua_gettop(l); if (argc == 4) { UnityEngine.Logger self = (UnityEngine.Logger)checkSelf(l); UnityEngine.LogType a1; checkEnum(l, 2, out a1); System.String a2; checkType(l, 3, out a2); System.Object[] a3; checkParams(l, 4, out a3); self.LogFormat(a1, a2, a3); pushValue(l, true); return(1); } else if (argc == 5) { UnityEngine.Logger self = (UnityEngine.Logger)checkSelf(l); UnityEngine.LogType a1; checkEnum(l, 2, out a1); UnityEngine.Object a2; checkType(l, 3, out a2); System.String a3; checkType(l, 4, out a3); System.Object[] a4; checkParams(l, 5, out a4); self.LogFormat(a1, a2, a3, a4); pushValue(l, true); return(1); } pushValue(l, false); LuaDLL.lua_pushstring(l, "No matched override function LogFormat to call"); return(2); } catch (Exception e) { return(error(l, e)); } }
public static int LogException(IntPtr l) { int result; try { int num = LuaDLL.lua_gettop(l); if (num == 2) { UnityEngine.Logger logger = (UnityEngine.Logger)LuaObject.checkSelf(l); Exception exception; LuaObject.checkType <Exception>(l, 2, out exception); logger.LogException(exception); LuaObject.pushValue(l, true); result = 1; } else if (num == 3) { UnityEngine.Logger logger2 = (UnityEngine.Logger)LuaObject.checkSelf(l); Exception exception2; LuaObject.checkType <Exception>(l, 2, out exception2); UnityEngine.Object context; LuaObject.checkType <UnityEngine.Object>(l, 3, out context); logger2.LogException(exception2, context); LuaObject.pushValue(l, true); result = 1; } else { LuaObject.pushValue(l, false); LuaDLL.lua_pushstring(l, "No matched override function LogException to call"); result = 2; } } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
private void Start() { _logger = new UnityEngine.Logger(new LabyrinthLogHandler()); _logger.Log(_tag, "Statistics Start."); try { _textResult = GetComponent <Text>(); if (File.Exists(Path.Combine(Application.dataPath, "session_list.xml"))) { _textResult.text = getTable(SessionList.Load().Sessions); } else { _textResult.text = "No data"; } } catch (System.Exception e) { _logger.LogException(e); } }
public void Awake() { this.logger = new Logger() { enabled = (Application.isEditor == true && (this.textLogs & ActiveType.InEditor) != 0) || (Application.isEditor == false && (this.textLogs & ActiveType.InBuild) != 0) }; WindowSystemLogger.instance = this; }