Both modes call your Cloud Code allocator module in the same way. The only difference is the assignment type the game client receives after a match is found: with Cloud Code Hosting the client gets what your allocator returns from Poll, and in Backward Compatible mode it always gets a MultiplayAssignment.
-
Cloud Code Hosting: the client receives the assignment type that matches what your allocator returns. For dedicated server allocation this is
IpPortAssignment, returned withAssignmentData.IpPort(). You can also return custom connection data withAssignmentData.Custom(), which the client receives asCustomAssignment. Clients needcom.unity.services.multiplayer2.1.0 or later. -
Backward Compatible (Multiplay Hosting (Deprecated)): whatever your allocator returns, Matchmaker wraps the result into a
MultiplayAssignmentbefore it reaches the client. Use this only if you have a shipped client you can't update.
Your allocator code doesn't change between modes. The pool's hosting type setting in the dashboard controls the behavior. For setup, see Multiplayer Services documentation: Matchmaker hosting providers.