We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.
SpriteFrameCache::removeSpriteFramesFromFile(const std::string& plist) not remove elements from _loadedFileNames
SpriteFrameCache::removeSpriteFramesFromFile(const std::string& plist) not remove elements from _loadedFileNames
Bug #3634 [Closed]
after examine the problem more precisely I found the bug is triggered when CCSGUIReader load widget:
when CCSGUIReader::widgetFromJsonFile is called, plist's full path is passed to
SpriteFrameCache::addSpriteFramesWithFile(const std::string& pszPlist), this will cause
the variable 'pszPlist' equal to 'fullPath'
Redmine issue system is closed, we are using github issue system instead.
This issue was moved to https://github.com/cocos2d/cocos2d-x/issues/8302
Status: | Closed | |
---|---|---|
Start date: | 2014-01-09 | |
Priority: | Low | |
Due date: | ||
Assignee: | - | |
% Done: | 0% |
|
Category: | android | |
Target version: | - |
cocos2d version:cocos2d-x 3.0 beta
in SpriteFrameCache::addSpriteFramesWithFile(const std::string& pszPlist) ‘fullPath’ is inserted to ‘*loadedFileNames’
but in SpriteFrameCache::removeSpriteFramesFromFile
when removing element from ’*loadedFileNames’, ‘plist’ is removed. However plist’s fullPath is the element that should be removed.
This bug will cause manually removed sprite sheet can not be loaded again, for example when create a UIWidget from json again. Then SpriteFrame can’t be found…