CreateOrJoinMatchRequest

How does CreateOrJoinMatchRequest work? http://docs.unity3d.com/ScriptReference/Networking.Match.CreateOrJoinMatchRequest.html

I have this and it works to create a match.

CreateOrJoinMatchRequest createOrJoin = new CreateOrJoinMatchRequest();
createOrJoin.name = "matchname";
createOrJoin.size = 2;
createOrJoin.advertise = true;
createOrJoin.password = "";
networkMatch.CreateMatch(createOrJoin, OnMatchCreate);

But how do I give it the onMatchJoined callback?

An example of matchmaker callacks is here:

I have the same question really. I want the matchmaker to auto connect two players without one of them specifying if they are the host and the other is the client. CreateOrJoinMatchRequest sounds like it should do the job but when I use it both players create a new match instead of the one called second joining the first.

Should there be something like networkMatch.CreateOrJoinMatch ?

Ian

It looks like there is some missing functionality regarding CreateOrJoinMatchRequest.

When you go to the declaration, you can see that it derives from CreateMatchRequest, but aside from that it’s empty.
And the only method that takes a CreateMatchRequest is NetworkMatch.CreateMatch().

Is there something missing?

1 Like

Did you find a solution for this?