Phaser API Documentation

  Version: 
persist: boolean

Description:

Will this Tween persist after playback? A Tween that persists will not be destroyed by the Tween Manager, or when calling Tween.stop, and can be re-played as required. You can either set this property when creating the tween in the tween config, or set it prior to playback.

However, it's up to you to ensure you destroy persistent tweens when you are finished with them, or they will retain references you may no longer require and waste memory.

By default, Tweens are set to not persist, so they are automatically cleaned-up by the Tween Manager. But TweenChains do persist by default, unless overridden in their config. This is because the type of situations you use a chain for is far more likely to need to be replayed again in the future, rather than disposed of.

Type:
boolean
Since: 3.60.0