Phaser API Documentation

  Version: 
flushData()

Description:

Immediately flushes any changes to the player data to the designated cloud storage. This function is expensive, and should primarily be used for critical changes where persistence needs to be immediate and known by the game. Non-critical changes should rely on the platform to persist them in the background. NOTE: Calls to player.setDataAsync will be rejected while this function's result is pending.

Data managed via this plugins Data Manager instance is automatically synced with Facebook. However, you can call this method directly if you need to flush the data directly.

When the APIs flushDataAsync call resolves it will emit the flushdata event from this plugin. If the call fails for some reason it will emit flushdatafail instead.

Returns:
Description:

This Facebook Instant Games Plugin instance.

Examples:
Since: 3.13.0