question

Dylan Hunt avatar image
Dylan Hunt asked

Unity SDK: How to result.toString() to show full results?

^ I was sort of expecting a list, sort of like if I were on the JS SDK I could JSON.Stringify(result). How can I do this?

Authentication
resulttostring.png (4.9 KiB)
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

Correct - that's because the ToString being called in this case is the default, which returns the fully qualified name of the object type (PlayFab.ClientModels.LoginResult, in this case).

Instead, what you'll want to do is use SerializeObject to convert the JSON object into a string. There's a more complete discussion of this in the upgrade guide for the Unity SDK, here: https://github.com/PlayFab/UnitySDK/blob/7b4b4557d2a7b4aae2c46271fd295c109c1d81c8/UPGRADE.md

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.