Retrieving MatchmakingResults using the new Unity.Services.Multiplayer package in Unity 6

I am trying to retrieve the MatchId from Matchmaker in my server instance. As I understand, I should use the allocation uuid found in server.json to retrieve the MatchmakingResults value that allocated my instance.

The current documentation makes a mention of using the sdk like this:

var payloadAllocation = await MultiplayService.Instance.GetPayloadAllocationFromJsonAs<MatchmakingResults>();

However, the namespace MultiplayService is not included in the new com.unity.services.multiplayer package.
Should I also be installing the latest multiplay package that contains the GetPayloadAllocationFromJsonAs method?

or will Unity.Services.Matchmaker.MatchmakerService.Instance.GetMatchmakingResultsAsync work in the same way if I pass in the allocation uuid?

As an alternative, I also see in the docs a mention of send this request

curl -X GET http://localhost:8086/payload/<allocation_uuid>

Will this work as an alternative to the mutiplay package?

Hi @felipemullen ,
You need to enable the define symbol UNITY_SERVER to have access to the MultiplayService static class (and by extension MultiplayService.Instance) is included in com.unity.services.multiplayer. You can either set it manually (in code, in your ASMDEF file, or in the Player Settings) or switch into “Linux Server” build in the Build Profiles.

This is because Multiplay is our Game hosting platform and any operation (such as retrieving Multiplay events, getting the Multiplay Payload allocation, …) are only supported in the Multiplay environment.

Thanks @ArthurAtUnity, I will add the define for the class I am working on. I was also able to get the data by making an Http request to that endpoint on an allocated instance so I was able to move forward.

I missed that part in the docs that mention the UNITY_SERVER define, so I went back to find it:

https://docs.unity.com/ugs/en-us/manual/mps-sdk/manual/migration-path#Migrate_from_Multiplay

Cheers!