var PAsset = new ParticleAsset("res/Tool_Completion_Particle.plist") ;
var node = new Node();
director.getScene().addChild(node);
var particleSystem = node.addComponent(ParticleSystem2D);
particleSystem.file = PAsset;
I am new on cocos , so tried myself as above to load particles dynamically but it throws error “TypeError: Cannot read properties of null (reading ‘maxParticles’)”
Can you help me resolve the issue?