We are currently following the PlayFab tutorial Writing Custom Cloud Script. The problem is, the FunctionResult is always null in the Unity SDK. The log and everything is populated correctly, and the call is successful, but the FunctionResult is null. Am I doing something incorrectly or is this a bug?
// Cloud Script handlers.helloWorld = function (args, context) { var message = "Hello " + currentPlayerId + "!"; log.info(message); var inputValue = null; if (args && args.hasOwnProperty("inputValue")) inputValue = args.inputValue; log.debug("helloWorld:", { input: inputValue }); return { messageValue: message }; } // C# Unity SDK private static void OnCloudHelloWorld(ExecuteCloudScriptResult result) { // Cloud Script returns arbitrary results, so you have to evaluate them one step and one parameter at a time Debug.Log(JsonWrapper.SerializeObject(result.FunctionResult)); JsonObject jsonResult = (JsonObject)result.FunctionResult; object messageValue; jsonResult.TryGetValue("messageValue", out messageValue); // note how "messageValue" directly corresponds to the JSON values set in Cloud Script Debug.Log((string)messageValue); }