Writing simple multiplayer OpenXR scene not using Unity Cloud Services (Local server)

Hi,
I’ve made several multiplayer applications and I’ve made several VR applications. Now, I want to combine these two but I do not want to use the Unity Cloud services. So, the beautiful MPVR templates that Unity has provided do not really help :slight_smile: .
I want to have several local computers on a LAN. Create one as the server (not host) and the rest as clients. The clients need to pop up inside the same location and need to be able to see each other. Etc, Etc.

Is there a nice tutorial or video or sample scene available anywhere? I’ve looked but no luck in finding what I need.

Cheers!!

Marco

Without setting up a full blow dedicated server (for ease of testing purposes), you should be able to modify the Multiplayer template to:

  • Not authorize via services as well as not use relay or lobby.
    • You should be able to comment out/remove that script.
  • Make a stand alone build.
  • Start one instance as a server.
  • As long as you know the IP of that server, then have the clients join using that IP address.

Let me know if this helps you resolve your issue or if you need additional assistance with this.

Hi Noel,
Thanks for your super quick reply!
Yes, that’s what I thought too. So, I actually started this but commenting out stuff turned out to be a lot of work. Once I started to deactivate Lobby and Relay stuff and Vivox I kept running into issues (obviously) that I started wondering if it was not easier to use the default Networkmanager of Netcode and just create it my self. Although the handy XRI tools for multiplayer like animations and hands etc would be nice.
At the moment I am looking into starting from scratch without a template. My main worry is anything specific XR that I might want to or need to sync. All the other stuff (stand-alone server, testing, IPs, etc) is fine :slight_smile: .
We’ll see!

For LAN-only games you can also use NetworkDiscovery which broadcasts a server to the same subnet so that other clients simply “become aware” of any server they could join. This is for the player’s convenience only so they needn’t enter an IP address (or host name).

Yeah… I hear you in regards to picking the right path. With Unity sometimes it is a combination of specific things from various places that you end up modifying for your project’s needs.

With that said, you also might take a look at this Overriding Scenes and Network Prefabs example as it has several components that you might find useful. As one example, the NetworkManagerBootstrapper shows how to start in various modes depending upon the NetworkManager’s configuration and it has some useful things for separating between dedicated server assets/scripts and client assets/scripts.

You might find some of it useful.
:+1: