我的做法是:
在lua中:
local node = cc.CSLoader:getInstance():createNodeWithFlatBuffersFile(“studio/res/xxx.csb”)
local animation = node:getChildByName(“animation”)
layerGame:addChild(node)
node:setPosition(500, 500)
animation:gotoFrameAndPlay(1)
出错:
LUA ERROR: attempt to call method ‘gotoFrameAndPlay’ (a nil value)
