cocostudio动画编辑器中加入粒子效果,cocos2d3.3在播放的时候报错: The value type isn't Type::MAP
在 CCDataReaderHelper.cpp 的 1335 行加上:
此方法中 void DataReaderHelper::addDataFromJsonCache(const std::string& fileContent,DataInfo *dataInfo)
std::string plistPath = filePath + ".plist";
std::string pngPath = filePath + ".png";
//增加下面两行就行
+ ValueMap dict = FileUtils::getInstance()->getValueMapFromFile(dataInfo->baseFilePath + plistPath);
+ if (dict.find("particleLifespan") != dict.end()) continue;
ArmatureDataManager::getInstance()->addSpriteFrameFromFile((dataInfo->baseFilePath + plistPath).c_str(),(dataInfo->baseFilePath + pngPath).c_str(),dataInfo->filename.c_str());