Hi, have been trying to get some info from my meta collection but couldn't find any updated answers. Most are about runtime(which I can't create anymore) and GetObjectList (which is deprecated).
I'm trying to create a search for a random list of other players, but I am unable to access the playerData, so I have created a playerinfo collection to make them accessible.
So far, I'm able to get the test harness to produce this :
Zack Cee
Hi, have been trying to get some info from my meta collection but couldn't find any updated answers. Most are about runtime(which I can't create anymore) and GetObjectList (which is deprecated).
I'm trying to create a search for a random list of other players, but I am unable to access the playerData, so I have created a playerinfo collection to make them accessible.
So far, I'm able to get the test harness to produce this :
which is what I want.
Here is my method in Unity:
public void SearchForList()
{
logEventRequest.SetEventKey("SEARCH_TARGET")
.Send((response) =>
{
if (!response.HasErrors)
{
Debug.Log(response.JSONData.Count); <<-- returns wrong count
Debug.Log(data.GetString("PLAYER_ID")); <<-- returns null
Debug.Log(response.JSONString); <<-- returns correct JSON string
}
else
{
Debug.Log(response.Errors.JSON);
}
});
}
I would like the response to be like this
if (!response.HasErrors)
{
GSData data = response.scriptData;
string targetID = data.GetString("PLAYER_ID");
string targetDisplayName = data.GetString("PLAYER_NAME);
}
is this possible?
Thanks in advance.