Hello, I'm a bit new to PlayFab and I am having some difficulty with ExecuteCloudScriptResult.
I'm trying to return a list of values. Preferably a dictionary and be able to access that in unity. Ideally
I've had success using the clientAPI but now I'm looking to cloudscript to help with cheating.
CloudScript:
var UpdateReadOnlyDataResponse = UpdateReadOnlyData(var1, var2); return { response: UpdateReadOnlyDataResponse };
function UpdateReadOnlyData(gear, hbar) { var UpdateUserReadOnlyDataRequest = { "PlayFabId": currentPlayerId, "Data": {} }; UpdateUserReadOnlyDataRequest.Data["gear"] = gear; UpdateUserReadOnlyDataRequest.Data["hotbar"] = hbar; var UpdateUserReadOnlyDataResponse = server.UpdateUserReadOnlyData(UpdateUserReadOnlyDataRequest); return UpdateUserReadOnlyDataResponse.Data; }
Ideally I'd like to return UpdateUserReadOnlyDataResponse.Data and be able to parse it properly, accessing each key.
In Unity:
Debug.Log (result.CustomData); Debug.Log (result.FunctionResult);
CustomData returns null.
FunctionResult returns "{ }".
My CloudScript functions seem to be working fine, I'm just having problems returning and using the data in unity.