private CBLuaPanel GetLuaPanel(string key, UIControlData uiControlData) { string luaPath = UIPathHelper.GetLuaPath(key); LuaTable scriptEnv = NgameLua.Load(luaPath); if (scriptEnv == null) { return(null); } CBLuaPanel pnl = new CBLuaPanel(luaPath, scriptEnv, uiControlData); return(pnl); }
public static void Init() { if (m_luaTable != null) { m_luaTable.Dispose(); } m_luaTable = null; m_luaTable = NgameLua.Load(LUAPATH); if (m_luaTable == null) { Debug.LogErrorFormat("Lua file not exist : {0}", LUAPATH); return; } m_getPathFunc = m_luaTable.GetInPath <Func <string, string> >("UIPathConfig.GetPath"); }