Node* CSLoader::nodeWithFlatBuffersFile(const std::string %26fileName)
{
std::string fullPath = FileUtils::getInstance()->fullPathForFilename(fileName);
CC_ASSERT(FileUtils::getInstance()->isFileExist(fullPath));
Data buf = FileUtils::getInstance()->getDataFromFile(fullPath);
auto csparsebinary = GetCSParseBinary(buf.getBytes());
// decode plist
auto textures = csparsebinary->textures();
int textureSize = csparsebinary->textures()->size();
CCLOG("textureSize = %d", textureSize);
for (int i = 0; i < textureSize; ++i)
{
//运行到这里出错
SpriteFrameCache::getInstance()->addSpriteFramesWithFile(textures->Get(i)->c_str());
}
Node* node = nodeWithFlatBuffers(csparsebinary->nodeTree());
return node;
}