public override void Initialize(params object[] args) { m_DebuggerComponent = GameEntry.GetComponent <DebuggerComponent>(); if (m_DebuggerComponent == null) { Log.Fatal("Debugger component is invalid."); return; } m_SettingComponent = GameEntry.GetComponent <SettingComponent>(); if (m_SettingComponent == null) { Log.Fatal("Setting component is invalid."); return; } m_LastIconX = m_SettingComponent.GetFloat("Debugger.Icon.X", 10f); m_LastIconY = m_SettingComponent.GetFloat("Debugger.Icon.Y", 10f); m_LastWindowX = m_SettingComponent.GetFloat("Debugger.Window.X", 10f); m_LastWindowY = m_SettingComponent.GetFloat("Debugger.Window.Y", 10f); m_LastWindowWidth = m_SettingComponent.GetFloat("Debugger.Window.Width", 480f); m_LastWindowHeight = m_SettingComponent.GetFloat("Debugger.Window.Height", 360f); m_DebuggerComponent.WindowScale = m_LastWindowScale = m_SettingComponent.GetFloat("Debugger.Window.Scale", 1f); m_DebuggerComponent.IconRect = new Rect(m_LastIconX, m_LastIconY, 60f, 60f); m_DebuggerComponent.WindowRect = new Rect(m_LastWindowX, m_LastWindowY, m_LastWindowWidth, m_LastWindowHeight); }
static int GetBool(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(UnityGameFramework.Runtime.SettingComponent), typeof(string))) { UnityGameFramework.Runtime.SettingComponent obj = (UnityGameFramework.Runtime.SettingComponent)ToLua.ToObject(L, 1); string arg0 = ToLua.ToString(L, 2); bool o = obj.GetBool(arg0); LuaDLL.lua_pushboolean(L, o); return(1); } else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(UnityGameFramework.Runtime.SettingComponent), typeof(string), typeof(bool))) { UnityGameFramework.Runtime.SettingComponent obj = (UnityGameFramework.Runtime.SettingComponent)ToLua.ToObject(L, 1); string arg0 = ToLua.ToString(L, 2); bool arg1 = LuaDLL.lua_toboolean(L, 3); bool o = obj.GetBool(arg0, arg1); LuaDLL.lua_pushboolean(L, o); return(1); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityGameFramework.Runtime.SettingComponent.GetBool")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int GetObject(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(UnityGameFramework.Runtime.SettingComponent), typeof(System.Type), typeof(string))) { UnityGameFramework.Runtime.SettingComponent obj = (UnityGameFramework.Runtime.SettingComponent)ToLua.ToObject(L, 1); System.Type arg0 = (System.Type)ToLua.ToObject(L, 2); string arg1 = ToLua.ToString(L, 3); object o = obj.GetObject(arg0, arg1); ToLua.Push(L, o); return(1); } else if (count == 4 && TypeChecker.CheckTypes(L, 1, typeof(UnityGameFramework.Runtime.SettingComponent), typeof(System.Type), typeof(string), typeof(object))) { UnityGameFramework.Runtime.SettingComponent obj = (UnityGameFramework.Runtime.SettingComponent)ToLua.ToObject(L, 1); System.Type arg0 = (System.Type)ToLua.ToObject(L, 2); string arg1 = ToLua.ToString(L, 3); object arg2 = ToLua.ToVarObject(L, 4); object o = obj.GetObject(arg0, arg1, arg2); ToLua.Push(L, o); return(1); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityGameFramework.Runtime.SettingComponent.GetObject")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int RemoveAllSettings(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); UnityGameFramework.Runtime.SettingComponent obj = (UnityGameFramework.Runtime.SettingComponent)ToLua.CheckObject(L, 1, typeof(UnityGameFramework.Runtime.SettingComponent)); obj.RemoveAllSettings(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
public void Initialize(params object[] args) { m_SettingComponent = GameEntry.GetComponent <SettingComponent>(); if (m_SettingComponent == null) { Log.Fatal("Setting component is invalid."); return; } Application.logMessageReceived += OnLogMessageReceived; m_LockScroll = m_LastLockScroll = m_SettingComponent.GetBool("Debugger.Console.LockScroll", true); m_InfoFilter = m_LastInfoFilter = m_SettingComponent.GetBool("Debugger.Console.InfoFilter", true); m_WarningFilter = m_LastWarningFilter = m_SettingComponent.GetBool("Debugger.Console.WarningFilter", true); m_ErrorFilter = m_LastErrorFilter = m_SettingComponent.GetBool("Debugger.Console.ErrorFilter", true); m_FatalFilter = m_LastFatalFilter = m_SettingComponent.GetBool("Debugger.Console.FatalFilter", true); }
static int HasSetting(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); UnityGameFramework.Runtime.SettingComponent obj = (UnityGameFramework.Runtime.SettingComponent)ToLua.CheckObject(L, 1, typeof(UnityGameFramework.Runtime.SettingComponent)); string arg0 = ToLua.CheckString(L, 2); bool o = obj.HasSetting(arg0); LuaDLL.lua_pushboolean(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int SetObject(IntPtr L) { try { ToLua.CheckArgsCount(L, 3); UnityGameFramework.Runtime.SettingComponent obj = (UnityGameFramework.Runtime.SettingComponent)ToLua.CheckObject(L, 1, typeof(UnityGameFramework.Runtime.SettingComponent)); string arg0 = ToLua.CheckString(L, 2); object arg1 = ToLua.ToVarObject(L, 3); obj.SetObject(arg0, arg1); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }