ParticleFlower No file found at /__firePngData. v3.17.2

Hello everyone, i’m trying to create a ParticleFlower like this:

I load this before:

std::string path;
path = FileUtils::getInstance()->fullPathForFilename("stars.png");
auto texture = Director::getInstance()->getTextureCache()->addImage(path); //using texture here just to check if it was added and is not nullptr

Then i want to Run the particleSystem:

ParticleSystemQuad* emitter = nullptr;
emitter = ParticleFlower::create();
fileName = FileUtils::getInstance()->fullPathForFilename("stars.png");
texture = Director::getInstance()->getTextureCache()->getTextureForKey(fileName);
emitter->setTexture(texture);
emitter->retain();
sprite->addChild(emitter, 11);

but is not running and i see this output:
cocos2d: fullPathForFilename: No file found at /__firePngData. Possible missing file.

I can’t find anything related to this output so any help will be appreciated.

Thanks.

The problem is here, if i remove this line it works:
emitter->setCameraMask(static_cast<int>(CameraFlag::USER1));

but i want it in that camera, otherwise is not well positioned.

Anyway is not positioned in 0,0 by default so this solved the problem. (using USER1 as camera)

emitter->setPosition(Vec2::ZERO);

I suggest you to put the file “starts.png” in the Resources folder so that you access it without asking for the full path.

auto texture = Director::getInstance()->getTextureCache()->addImage("stars.png");

And later on:

ParticleSystemQuad* emitter = nullptr;
emitter = ParticleFlower::create();
texture = Director::getInstance()->getTextureCache()->getTextureForKey("stars.png");
emitter->setTexture(texture);
emitter->retain();
sprite->addChild(emitter, 11);