-
Notifications
You must be signed in to change notification settings - Fork 362
Multiplayer Quickstart
Note: Quick draft of this page. Images, links, formatting will be added later.
LS uses a modular networking system so that you can use DarkRift, Photon, or sockets as long as you are able to send and receive a byte array.
Later we'll look at how to implement a custom networking solution. For now we will use Photon for quickily getting multiplayer up.
First, download Photon Networking Free from the asset store. Follow its instructions to set up a connection to their relay server.
Now pull PhotonNetworkingHelper. Add that to your project.
Drag and drop the PhotonNetworkingHelper MonoBehaviour onto the Manager GameObject (GO) in the example scene.
Now build your game and run 2 instances of it. For example, run the build and also play in the editor. On one instance, set the Room Size to 2 then click host. On the other instance, hit connect.
The 2 instances should now be synced and playing.