Edge Multiplay is a solution to make building a multiplayer game in Unity open and transparent, especially for real time games that need lower latency. Have questions or suggestions to make this solution even better? Join the MobiledgeX Community Discord!
The Unity Client for this Docker Server is also open source and integrated with our MobiledgeX SDK. We have provided a few sample servers that are deployed globally on the MobiledgeX Edge-Cloud platform. In this guide, we will walk you through how to setup and connect to these sample servers using the MobiledgeX Unity SDK. For more documentation on the MobiledgeX Edge Multiplay client, please refer to our API documentation.
You will need Git installed to import the Unity SDK.
From a new Unity project, import the MobiledgeX Unity SDK. To do this, open the Package Manager under the Window Menu Window/Package Manager.
Next, click the + icon and Import Using Git URL. Copy and paste this URL : https://github.com/mobiledgex/edge-cloud-sdk-unity.git
Once the MobiledgeX SDK has finished installing, there will now be a new MobiledgeX Menu. From the MobiledgeX Menu Import EdgeMultiplay, select MobiledgeX/Examples/EdgeMultiplay
Connect to EdgeMultiplay Server sample
Once EdgeMultiplay is installed in your Project Assets, we need to provide application credentials to the MobiledgeX SDK to find the closest EdgeMultiplay Server.
From MobiledgeX Menu go to MobiledgeX/Setup
Edge Multiplay Credentials
Add the following credentials:
Organization Name : MobiledgeX-Samples
App Name : EdgeMultiplay
App Version : 1.2
Then click Setup
Now you are all set to connect to an Edge Multiplay Game Server!
Testing Edge Multiplay with Ping Pong
To test Edge Multiplay, we have provided an example implementation of Ping Pong with Edge Multiplay. In Your Projects folder, under EdgeMultiplay/Examples, there is a PingPongExample.unitypackage file. Double click it to import that example into your assets.
Once the import finishes, you will now have PingPongGame as a folder under your Assets. Under PingPongGame/Scenes, there will be a PingPongScene. Open that scene and click Run.
If you see the following text, you have succesfully connected to an instance of the server. To play the Ping Pong Sample, you will need to Build and Run another instance of the client.