GameStorageApi.watch() method
This method provides realtime notifications when a value changes in the game storage.
The provided callback will be called with the initial value and then every time the value associated with the given key changes.
Signature:
watch(key: string, cb: (data: any) => void): () => void;
Parameters
Parameter | Type | Description |
---|---|---|
key | string | |
cb | (data: any) => void |
Returns:
() => void