Google Play Services Real time Multi player and Unity HELP NEEDED

Hello guys, I believe this is my first post in here so wee! :slight_smile:

Any way I have to ask for little help because I got stuck @ point…

I am using google’s unity3d google play services plugin…

I have implemented everything from sign in achievements leader boards…

Now where I’m stuck is starting real time multiplayer game.

In google documents they say to call Quick Game

But I have lost all idea’s how to do it I tried 100 options I always have some script error…

Can some one help out? Point to good direction …
I tried to find tutorial online but no luck…

Thanks…

Hey I just bumped into the same issue with creating games.

PlayGamesPlatform.Instance.RealTime.CreateQuickGame(MinOpponents, MaxOpponents,
GameVariant, listener);

The fourth parameter in that call is a listener.
My issue was that you had to have an instance of the listener (RealTimeMultiplayerListener)

I did some digging and found that the RealTimeMultiplayerListener class is an interface so you can’t instantiate it.
That being said you’ll have to write a script to implement that interface.
You will also have to override the methods to do what you want.
Then you should have a working listener.

I’m currently implementing it now. I’ll post some code if you need it when I’m done.
(Also I’m a coder by trade so let me know if you’d like me to talk at a higher level)

Plz can you post your code, i have the same problem with nitroy2k.

You have to inherit your class from GooglePlayGames.BasicApi.Multiplayer.RealTimeMultiplayerListener. Then you add the functionality. You CANNOT attach this class to an object. Make a static and public method called CreateQuickMatch as well. You’ll need to make a reference (instance) of the Listener.

For example:
public class MultiplayerManager : GooglePlayGames.BasicApi.Multiplayer.RealTimeMultiplayerListener
{
private static MultiplayManager sInstance = new MultiplayerManager;

public static void CreateQuickMatch ()
{
PlayGamesPlatform.Instance.RealTime.CreateQuickGame (, , , sInstance);
}

public static MultiplayManager Instance {
get { return sInstance; }
}
}

So from another class, to call CreateQuickMatch you just call MultiplayerManager.CreateQuickMatch(); that’s it. I hope this helped somebody.