public static new LuaTable Add(GameObject go, LuaTable tableClass) { LuaFunction luaFunc = tableClass.GetLuaFunction("New"); if (luaFunc == null) { return(null); } object rets = luaFunc.Invoke <LuaTable, object>(tableClass); if (rets == null) { return(null); } LuaUIComponent _com = go.AddComponent <LuaUIComponent>(); _com.table = (LuaTable)rets; _com.CallAwake(); return(_com.table); }