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);
            }
Example #2
0
    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));
        }
    }