You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes, it is intended that you don't use an emitter after destroying it. If you just wanted all your particles gone but to continue using the emitter, use Emitter.cleanup().
Yes, but in the event that it is accidentally used after being destroyed - I would assume it would be better to fail silently or log an error than to throw and interrupt execution?
A simple
if(this.owner){...}
would prevent it from throwing.
This is easy to happen on accident if the emitter is in an array and wasn't removed from the array after being destroyed.
How to reproduce:
Make an emitter.
emitter.destroy()
emitter.updateOwnerPos(0,0)
It throws an error that can interrupt js execution.
The text was updated successfully, but these errors were encountered: