question

agniesportsyt avatar image
agniesportsyt asked

How to access Array of CloudScript in Unity's C# Script

1. This is the my friend request receiving cloud script. I want to access the Requester array and the variable i in the Unity's C# script, so that i can instantiate a gameobject for each friend requests an display them to the user. PLease provide me a fragment of code to access the above mentioned array and variable.

2. How to access the FRsender and message using Requester. Is it done like ->

Requester[1].FRsender.ToString();

Please Do answer my quesetions and Thank you in advance.

CloudScriptShared Group DataFriends
screenshot-9.png (38.4 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

·
Seth Du avatar image
Seth Du answered

I am not sure of the details in Requester, but in PlayFab Unity SDK, you may deserialize a string into an Object via the following code:

PlayFab.PluginManager.GetPlugin<ISerializerPlugin>(PluginContract.PlayFab_Serializer)

according to UnitySDK/PluginManager.md at master PlayFab/UnitySDK (github.com).

Please also feel free to send us a detailed dummy JSON data so that I will provide a sample code for you.

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.