Hello everyone,
I am using Unity and I am trying to return some data from the cloud script but I don't know what to do with the result. When I print the result, it is correct but how can I convert that data in Unity?
Here's the cloud script code:
handlers.TestAPI = function (args, context) { //... the code return { "Result": 0 }; }
Here's the Unity C# code, which doesn't work:
Debug.Log(data.FunctionResult.ToString()); // It prints: {"Result":0} Dictionary<string, string> result = JsonUtility.FromJson<Dictionary<string, string>>(data.FunctionResult.ToString());