如何使用luac工具只编译指定的函数体,或者有没有别的方法可以编译指定的函数体。
local count = 1
gridTemplate:GetChild(0):SetActive(true)
self:FillShopList(count, itemTemplate, gridTemplate)
local uiGrid = gridTemplate:GetComponent("UIGrid")
uiGrid:Reposition()
self:TouchGameObject(self.m_panel, self.m_parent)
local data={27,76,117,97,81,0,1,4,4,4,8,0,52,0,0,0,64,70,58,47,195,206,214,23,90}
local str = ''
for i = 1, #data, 1 do
local c = string.char(data[i])
str = str .. c
end
local loaddata = loadstring(str)
if loaddata then
loaddata(self,bg)
end
代码中的local data={27,76,117,97,81,0,1,4,4,4,8,0,52,0,0,0,64,70,58,47,195,206,214,23,90}是一个编译后的lua函数体。