Hello, I have a small problem, I pass my string as example "Test" through GameStreamEvent to playfab, this triggers my azure function, then I want to add this string from the StreamEvent (Test) to User-Data, all is working and I can even see the "Test" String in "context.PlayStreamEventEnvelope.EventData...."
The last thing I tried was with context.FunctionArgument, but that isnt working too, I think it must be something with context.PlayStreamEventEnvelope.EventData, because when I use this all data is added to my player, but now I want that the azure function only adds the "test" field, but I have no idea how to access it, could someone please guide me in the right direction?
[FunctionName("PlayStreamEventHandler")] public static async Task Run([QueueTrigger("login-events", Connection = "AzureWebJobsStorage")] string myQueueItem, ILogger log) { var context = JsonConvert.DeserializeObject<PlayerPlayStreamFunctionExecutionContext<dynamic>>(myQueueItem); log.LogInformation($"C# Queue trigger function processed: {myQueueItem}"); PlayFabSettings.staticSettings.TitleId = context.TitleAuthenticationContext.Id; PlayFabSettings.staticSettings.DeveloperSecretKey = Environment.GetEnvironmentVariable("PlayFabDeveloperSecretKey"); await UpdatePlayerData(log, context); } private static async Task UpdatePlayerData(ILogger log, PlayerPlayStreamFunctionExecutionContext<dynamic> context) { dynamic args = context.FunctionArgument; dynamic test = args["Test"]; var updateUserDataRequest = new PlayFab.ServerModels.UpdateUserDataRequest { PlayFabId = context.PlayerProfile.PlayerId, Data = new Dictionary<string, string> { {"Test", test} } }; PlayFabResult<PlayFab.ServerModels.UpdateUserDataResult> result = await PlayFabServerAPI.UpdateUserDataAsync(updateUserDataRequest); HandleError(log, result); }