PlayFabCloudScriptAPI.ExecuteEntityCloudScript(new ExecuteEntityCloudScriptRequest() { FunctionName = "TestId", }, (res) => { Debug.Log(res); }, res => { Debug.Log(res); });
handlers.TestId = function (args, context) { var entityProfile = context.currentEntity; log.info(currentPlayerId); log.info(entityProfile.Entity); }
First - my client (Unity) code. Second - my cloud script function. entityProfile.Entity is the same every call (it's my entity), but currentPlayerId -is different all the time and belongs to another random player.