void Awake() { LuaSystem.Init(); TimeSpan timeSpa1n = DateTime.Today.ToUniversalTime() - new DateTime(1970, 1, 1); Application.logMessageReceived += (string condition, string stackTrace, LogType type) => { if (type.Equals(LogType.Exception) || type.Equals(LogType.Error)) { TimeSpan timeSpan = DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0); string timeStamp = ((int)timeSpan.TotalSeconds).ToString(); string hostName = System.Net.Dns.GetHostName(); string userName = System.Environment.UserName; string machineName = System.Environment.MachineName; ToLuaUtility.HttpPostRequest("http://192.168.8.216/errlog.php", (UnityWebRequest req) => { Debug.Log(req.downloadHandler.text); }, "", "submit", "logType", type.ToString(), "condition", condition, "stackTrace", stackTrace, "timeStamp", timeStamp, "hostName", hostName, "userName", userName, "machineName", machineName ); } }; }
static int __CreateInstance(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); if (LuaAPI.lua_gettop(L) == 1) { ToLuaUtility gen_ret = new ToLuaUtility(); translator.Push(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(LuaAPI.luaL_error(L, "invalid arguments to ToLuaUtility constructor!")); }
static int _m_GetWorldCorners_xlua_st_(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); { UnityEngine.RectTransform _trans = (UnityEngine.RectTransform)translator.GetObject(L, 1, typeof(UnityEngine.RectTransform)); UnityEngine.Vector3[] gen_ret = ToLuaUtility.GetWorldCorners(_trans); translator.Push(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_HttpGetRequest_xlua_st_(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); { string _url = LuaAPI.lua_tostring(L, 1); System.Action <UnityEngine.Networking.UnityWebRequest> _callback = translator.GetDelegate <System.Action <UnityEngine.Networking.UnityWebRequest> >(L, 2); string _data = LuaAPI.lua_tostring(L, 3); string _command = LuaAPI.lua_tostring(L, 4); string[] _args = translator.GetParams <string>(L, 5); ToLuaUtility.HttpGetRequest(_url, _callback, _data, _command, _args); return(0); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }