Save any JSON state to a specific user. Pass a JSON object to the SaveState
function. You'll be able to see this from your dashboard at any time.
GalaxyClientAPI.SaveState(new GalaxySDK.ClientModels.SaveStateRequest {
State = "{\"RoundStartedTime\":1677935836,\"TutorialsCompleted\":true}"
}, result => { }, error => { });
window.galaxy.SaveState({
state: jsonObject
}, (result, error){
if(error){ console.error(error); }
});
GalaxySDK.shared.saveState(state: jsonString, completion: { success in
print("Success: " + success)
})
Galaxy_SaveState(stringified_json)
You can browse any individual user's state on the dashboard.
GalaxyClientAPI.GetState(new GalaxySDK.ClientModels.GetStateRequest {
}, result => {
MyStateObject gameState = JsonUtility.FromJson<MyStateObject>(result.State);
}, error => { });
window.galaxy.GetState((result, error){
var state = JSON.parse(result.State);
});
GalaxySDK.shared.getState { stateString in
if let jsonObject = try JSONSerialization.jsonObject(with: jsonData, options: []) as? [String: Any] {
//etc
}
}
Galaxy_GetState(callback_success, callback_failure)