I am creating a broken brick particle from a factory. I did this hoping that resources would be less instead of attaching the particle efx to each brick instance. Well, if I break a brick the particle plays correctly.
But if I break another brick immediately after, I get errors. The second ref to the factory is nil and subsequent calls fail.
See video / error message attached.
Attached is an error dump but with code that detects a nil ref.
DEBUG:SCRIPT: BREAK: url: [game:/instance445#brick_dark_brown]
ERROR:GAMESYS: ParticleFx could not be created since the buffer is full (256). Increase the 'particle_fx.max_count' value in [game.project](defold://open?path=/game.project)
ERROR:GAMEOBJECT: Could not spawn an instance of prototype /game/particlefx/brick_break.goc.
DEBUG:SCRIPT: SPAWN IS NIL
ERROR:GAMESYS: Failed to setup state changed callback (has the calling script been destroyed?)
Snip of basic settings per emitter.