Multiplayer Setup¶
MAGES SDK provides collaborative sumulations out-of-the-box through an easy-to-use multiplayer interface.
The applications created with the MAGES SDK automatically work in collaborative environments without any additional work. In this way, you can join in the same room with your colleagues to complete a scenario.
Import Photon¶
In the MAGES panel, navigate to the Configuration Tab
Fix the issue releated to Photon Unity networking in order to be able to create coop sessions.
A window will open in your browser, make sure to add Photon to your Assets.
Navigate to
Window > Package Manager
. Make sure you are in your Assets, Download and Import PUN 2.
Create a Photon App ID¶
Open your browser and enter the Photon website.
Create a Photon account. If you already have one just login using your Photon credentials.
Enter the Photon Dashboard, located on the top right corner of the page.
Click on the CREATE A NEW APP button.
Select Pun as the Photon SDK, fill in the rest of the details and click the CREATE button.
This will create a new Photon Cloud App. Navigate back to your photon apps and copy the App ID of your app.
Link the App ID to your project¶
Open your Unity project and navigate to
Window > Photon unity Networking > PUN Wizard
.Click on Setup Project.
Insert your App ID in the PUN Setup and you are done. You can now host or join sessions.
Start a MAGES application¶
Start a MAGES application. You can use any device you like (VR, desktop or mobile).
From the initial menu select the MULTIPLAYER option.
Wait until the connection to the server is established.
How to host a Session¶
Once the connection to the server is established, if you want to host a Session select CREATE SESSION.
You are done. You are now hosting a session other players can join.
How to join a Session¶
Once the connection to the server is established, pick one of the available sessions someone else has hosted and select JOIN SESSION.
You are done. You have succesfully joined a Session.
Start the Session¶
When all the users have joined the room, the host should click on the START SESSION button to start the simulation.