Live update let you update database data on player's devices using Google Sheets, using public GoogleSheets Json API.
How it works
- First time your game is launched and database is loaded, it'll try to read data from Google Sheets
- If step 1 is successful, every time database is loaded, it will be merged with data from Google Sheets, thus applying the update.
- If step 1 is unsuccessful, database data will remain intact.
- Enable LiveUpdate plugin (under addons->LiveUpdate)
- Get "API key" from Google. Assign it to API key LiveUpdate addon parameter
- Get Spreadsheet Id from Google. Assign it to Spreadsheet Id LiveUpdate addon parameter
- Make sure to share target spreadsheet. Open target spreadsheet, click on Share button on the top right and set access level to "public" or "people with link". Otherwise you will get 403 error from GoogleSheets
Checking if setup was correct
You can check if you set up config properly by accessing this address from your browser (make sure it returns valid json, not some error )
For example, for the following parameters
- WebGl platform is not supported
- Plugin uses cell's value, not input value. Input value is raw data, and cell's value is formatted raw value If you use float fields (float, float?, List<float>), please, make sure displayed value for these fields are the same as input values (you may need to change cells formatting)
|Spreadsheet Id||Id of your spreadsheet. Learn how to obtain it here|
|API key||API key to use for request. Learn how to create it here|
|Timeout||Timeout for connection. Value (in seconds) is between 1-30, default is 5|
Set it to true if you do not want this addon to be executed automatically.
In this case, you will need to manually trigger the loading by calling
|In Builds Only||Setting this to true will disable addon if your game is run in Editor. It will work in builds only. It is recommended to set it to true as soon as you are sure the addon works correctly.|
|Merge Settings||The same merge settings you use for Export/Import or Saving/Loading. Learn more about merge settings here|