load 会调用以下方法,然后我传的 json 会调用 self:loadFile_(jsonFile) 如下:
function uiloader:load(jsonFile, params)
local json
if not params or not params.bJsonStruct then
local pathInfo = io.pathinfo(jsonFile)
if “.csb” == pathInfo.extname then
return cc.CSLoader:getInstance():createNodeWithFlatBuffersFile(jsonFile)
else
json = self:loadFile_(jsonFile)end else json = jsonFile end if not json then print("uiloader - load file fail:" .. jsonFile) return end local node if self:isScene_(json) then node, w, h = CCSSceneLoader:load(json, params) else node, w, h = CCSUILoader:load(json, params) end UILoaderUtilitys.clearPath() return node, w, h end -------然后我断点跟进后: <img title = '1.png' src='http://cdn.cocimg.com/bbs/attachment/Fid_56/56_301713_268828029074c7e.png' > <img title = '2.png' src='http://cdn.cocimg.com/bbs/attachment/Fid_56/56_301713_bc6bfff31f127d3.png' > fileUtil:getStringFromFile(fullPath) 返回的“” 空字符串 -----------------这个文件是 3.2 版本上用过的 没问题,studio 版本是1.6 创建的 , 今天升级到 quick3.3出现此问题