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); }
public override void Initialize(params object[] args) { m_DebuggerComponent = args[0] as DebuggerComponent; if (m_DebuggerComponent == null) { throw new System.ArgumentException("Debugger component is invalid."); } m_IsSDK = m_LastIsSDK = PlayerPrefs.GetInt("Debugger.Console.IsSDK", 1) > 0; //m_CloseLimit = m_LastCloseLimit = PlayerPrefs.GetInt("Debugger.Console.CloseLimit", 1) > 0; m_IsShowGuide = m_LastShowGuide = PlayerPrefs.GetInt("Debugger.Console.ShowGuide", 1) > 0; m_IsShowLog = m_LastIsShowLog = PlayerPrefs.GetInt("Debugger.Console.IsShowLog", 1) > 0; }
static int SelectDebuggerWindow(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); UnityGameFramework.Runtime.DebuggerComponent obj = (UnityGameFramework.Runtime.DebuggerComponent)ToLua.CheckObject(L, 1, typeof(UnityGameFramework.Runtime.DebuggerComponent)); string arg0 = ToLua.CheckString(L, 2); bool o = obj.SelectDebuggerWindow(arg0); LuaDLL.lua_pushboolean(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int get_ActiveWindow(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityGameFramework.Runtime.DebuggerComponent obj = (UnityGameFramework.Runtime.DebuggerComponent)o; bool ret = obj.ActiveWindow; LuaDLL.lua_pushboolean(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index ActiveWindow on a nil value" : e.Message)); } }
static int set_WindowRect(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityGameFramework.Runtime.DebuggerComponent obj = (UnityGameFramework.Runtime.DebuggerComponent)o; UnityEngine.Rect arg0 = (UnityEngine.Rect)ToLua.CheckObject(L, 2, typeof(UnityEngine.Rect)); obj.WindowRect = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index WindowRect on a nil value" : e.Message)); } }
static int set_WindowScale(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityGameFramework.Runtime.DebuggerComponent obj = (UnityGameFramework.Runtime.DebuggerComponent)o; float arg0 = (float)LuaDLL.luaL_checknumber(L, 2); obj.WindowScale = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index WindowScale on a nil value" : e.Message)); } }
static int RegisterDebuggerWindow(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); UnityGameFramework.Runtime.DebuggerComponent obj = (UnityGameFramework.Runtime.DebuggerComponent)ToLua.CheckObject(L, 1, typeof(UnityGameFramework.Runtime.DebuggerComponent)); string arg0 = ToLua.CheckString(L, 2); GameFramework.Debugger.IDebuggerWindow arg1 = (GameFramework.Debugger.IDebuggerWindow)ToLua.CheckObject(L, 3, typeof(GameFramework.Debugger.IDebuggerWindow)); object[] arg2 = ToLua.ToParamsObject(L, 4, count - 3); obj.RegisterDebuggerWindow(arg0, arg1, arg2); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int set_ShowFullWindow(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityGameFramework.Runtime.DebuggerComponent obj = (UnityGameFramework.Runtime.DebuggerComponent)o; bool arg0 = LuaDLL.luaL_checkboolean(L, 2); obj.ShowFullWindow = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index ShowFullWindow on a nil value" : e.Message)); } }
static int get_WindowScale(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityGameFramework.Runtime.DebuggerComponent obj = (UnityGameFramework.Runtime.DebuggerComponent)o; float ret = obj.WindowScale; LuaDLL.lua_pushnumber(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index WindowScale on a nil value" : e.Message)); } }
static int get_WindowRect(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityGameFramework.Runtime.DebuggerComponent obj = (UnityGameFramework.Runtime.DebuggerComponent)o; UnityEngine.Rect ret = obj.WindowRect; ToLua.PushValue(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index WindowRect on a nil value" : e.Message)); } }
public override void Initialize(params object[] args) { if (args.Length < 1) { throw new System.ArgumentException("Debugger component is invalid."); } m_DebuggerComponent = args[0] as DebuggerComponent; if (m_DebuggerComponent == null) { throw new System.ArgumentException("Debugger component is invalid."); } m_LastIconX = PlayerPrefs.GetFloat("Debugger.Icon.X", DefaultIconRect.x); m_LastIconY = PlayerPrefs.GetFloat("Debugger.Icon.Y", DefaultIconRect.y); m_LastWindowX = PlayerPrefs.GetFloat("Debugger.Window.X", DefaultWindowRect.x); m_LastWindowY = PlayerPrefs.GetFloat("Debugger.Window.Y", DefaultWindowRect.y); m_LastWindowWidth = DefaultWindowRect.width; //PlayerPrefs.GetFloat("Debugger.Window.Width", DefaultWindowRect.width); m_LastWindowHeight = DefaultWindowRect.height; //PlayerPrefs.GetFloat("Debugger.Window.Height", DefaultWindowRect.height); m_DebuggerComponent.WindowScale = m_LastWindowScale = DefaultWindowScale; //PlayerPrefs.GetFloat("Debugger.Window.Scale", DefaultWindowScale); m_DebuggerComponent.IconRect = new Rect(m_LastIconX, m_LastIconY, DefaultIconRect.width, DefaultIconRect.height); m_DebuggerComponent.WindowRect = new Rect(m_LastWindowX, m_LastWindowY, m_LastWindowWidth, m_LastWindowHeight); }