I'm trying to pull a value from a key in a shared group data. You can see below that 'gameString' (which is a public static string declared earlier) is set to a value. If I print gameString in the success function, it gives me the info I want, but if I print gameString in any other function, it returns null.
I'm new to Unity, PlayFab, and C#, so am I just not understanding the fundamentals of this string?
private static void PullGroupData(string sharedGroupId) { GetSharedGroupDataRequest request = new GetSharedGroupDataRequest() { SharedGroupId = sharedGroupId }; PlayFabClientAPI.GetSharedGroupData(request, GetSharedDataSuccess, SharedDataError); } private static void GetSharedDataSuccess(GetSharedGroupDataResult result) { List<string> keyList = new List<string>(result.Data.Keys); gameString = result.Data[keyList[0]].Value; } private static void SharedDataError(PlayFabError error) { print("Group Data Error: " + error); }