Your game has a single state value, which is overwritten each time you save state. In Unity, this can be any data of your choice, and the API will handle all serialization/deserialization. In Javascript, this can be any string data (e.g. JSON.stringify). Be sure to include your entire state payload each time you save state.