Hello,
I am trying to add a function using UserReadOnlyData and while following the documentation it does not seem to want to work in Visual Studio.
My Code:
using System; using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.Azure.WebJobs; using Microsoft.Azure.WebJobs.Extensions.Http; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; using Newtonsoft.Json; using PlayFab; using PlayFab.Samples; using PlayFab.ServerModels; [...] var UpdateUserTimeRequest = PlayFabServerAPI.UpdateUserReadOnlyData(new UpdateUserDataRequest() { PlayFabId = context.CallerEntityProfile.Lineage.MasterPlayerAccountId, // Way to get PlayfabID Data = new Dictionary<string, string>() { {"LastLoginTime", TimeResult.ToString()} }, Permission = UserDataPermission.Public }, result => Debug.Log("Set read-only user data successful"), error => { Debug.Log("Got error updating read-only user data:"); Debug.Log(error.GenerateErrorReport()); }); var UpdateUserTimeResult = serverApi.UpdateUserReadOnlyDataAsync(UpdateUserTimeRequest);
Thank you for your help.
EDIT: I understand, that I am probably missing some repository. Which one is it and where would I get it?