Thanks for replying. It’s very weird, and the conduct is inconsistent. At one level yesterday, I used to be loading 20 sheets, however instantly after, I fell again to the place I can load solely 10, even after a recreation restart. I don’t suppose I’m failing to take away any frames from the cache.
I’m not getting any errors, it merely doesn’t present a sprite. In actual fact, the sprite that I pull from the cache isn’t null, however nothing reveals up. Nonetheless, sooner or later, once I’m including sheets, I discover that the dimensions of the cache stops rising.
I take advantage of SpriteFrameCache::addSpriteFramesWithFile(const std::string& plist, const std::string& textureFileName)
to load every sheet, and I added this code to that methodology:
CCLOG("earlier than, _spriteFrames dimension = %d, _loadedFileNames dimension = %d",
_spriteFrames.dimension(), _loadedFileNames->dimension());
I additionally name removeSpriteFramesWithFile() earlier than calling the add methodology. Is removeSpriteFramesWithFile() synchronous? I’ve been assuming it’s.
I don’t have any callbacks.
Later, once I need the sprites, I name
jerseySprite = Sprite::createWithSpriteFrameName(jerseyName);
Proper now, I’m questioning if possibly I’m doing one thing mistaken. Say I’ve this:
- plist named my_image.plist
- png named my_image.png
Within the plist, what ought to the textureFileName be? I’ve tried setting it to my_image.plist and to my_image.png, and even tried simply leaving it out.