Hello Unity Developers!
We are thrilled to announce the release of our new VR Multiplayer Template! This template is packed with everything you need for networked interactions, voice chat, lobbies, and more. By leveraging Unity Gaming Services, Netcode For GameObjects and the XR Interaction Toolkit, you can start building multiplayer VR games quickly and seamlessly.
Why Choose Unity’s VR Multiplayer Template?
This template is perfect for people who want to dive straight into creating immersive multiplayer VR games without the hassle of building and maintaining foundational systems from scratch. It’s built to work well on the Meta Quest platform as well as other OpenXR compliant devices. Here’s what makes our template stand out:
- Networked Interactions via XRI Interaction Toolkit and Netcode for GameObjects
- Voice Communication via Vivox
- Connect to anyone, anywhere with Relay and Lobby
- Networked Avatars and Hands
- Works cross platform via OpenXR
Who Can Benefit from This Template?
The VR multiplayer template is designed for creators starting a new project that will target an OpenXR device. It is geared towards people who are prototyping a new experience, contributing to a project in a studio, working as an indie developer, exploring Unity as an enthusiast or building an app for a business.
Get Started Today!
Download the Unity VR Multiplayer Template for Unity 2022 LTS and Unity 6 Preview from the Unity Hub and check out the quickstart guide.
Join the Discussion
We’d love to hear your feedback and see what you create with our template! Post in Discussions or join our Discord to share your projects, ask questions, and collaborate with fellow developers. Your input will help us improve and expand the template in future updates.
Let’s build the future of multiplayer VR together!
10 Likes
Excited to check this out. Good VR templates are a huge help for learning the workflow VR uses. I’ve found one of the hardest parts is getting the foundation working and solid, so hopefully this will help many other devs make cool VR games
4 Likes
This is great and well needed. I just hope it’s kept up to date.
2 Likes
Joegre
6
We are definitely planning on it. We have an internal roadmap of neat features we would like to add as well.
2 Likes
Hello, Nice template, the examples are very interesting, but there is nothing about a simple clic (select) on a gameobject. The only interactions are clicking a UI, hovering or grabbing objects. But why ? Where can I find information to configure the simple click on a collider, for instance a cube ?
1 Like
Very Nice Template , How to use this Locally
I mean so we can use it without the UGS and relay only with local IPs
1 Like
Thanks for the timely updates! Your promptness is much appreciated
axvr
10
Hello, the light rotator is very messy in VR when export to Meta Quest, creating double circles as left and right eyes are not synced up. What is the purpose of this light?
Hello, will there be a version for the Apple Vision Pro soon?
ibyte
12
In the VR Multiplayer template - the intro help screen shows an object being distance grabbed and pulled towards the players controller (27 seconds into the video) . For the life of me I cannot figure out how to pull/push an object towards/away me that I grab from a distance? Normally the joystick push up or down while the object is grabbed should adjust the distance? Player 1/4 turn seems to still be in play.
Joegre
13
With the introduction of XRI 3, by default you now pull / push objects at a distance by physically pulling or pushing your arm in or out in the direction you want it to move. This motion control is highly configurable and tunable to your specific project. Inside your XR Origin under each controller / hand you will find a Near Far Interactor prefab placed as a child. Attached to that is an Interaction Attach Controller with a bunch of exposed values for determining this control from a prefab level.
This new interactor is super versatile. It would be very do-able to add custom joystick control to make it behave similar to the old interactor(s).
(From the docs):
It utilizes both near and far interaction casters, allowing seamless transitions between different interaction types, while also using the far interaction caster’s data to interact with UGUI.
This interactor is designed with modularity and extensibility in mind, allowing advanced developers to implement custom near and far casters that adhere to the IInteractionCaster
and ICurveInteractionCaster
interfaces, respectively.
1 Like
ibyte
14
Thank you so much for the reply. It would not have occurred to me to try that. I think it would be good to have that video updated and show that new functionality.
Joegre
15
The VR Multiplayer Template uses one baked directional light, and one realtime directional light for a mix of realtime shadows and performance. If you rotate the realtime directional light, you will most likely want to rebake the lighting as it won’t line up properly any longer with the baked light.
You could also try playing around with mixed lighting (would also require rebaking).
Joegre
16
We have a bunch of networked 3d interactable objects throughout the scene (they spawn when connecting to a game). Is there something else you were looking for?
Joegre
17
Check out this post for a local UGS workaround.
This is an amazing template, and I managed to get it up and running on 2 devices in only 2-3 hours!
However, I’m stuck now with a difficult problem and wanted to see if anyone has any ideas.
I tried putting the template project (unchanged) on the cloud, adding another account as a seat, and opening it on another machine, but it failed with an error about missing URP renderer.
I checked on the first machine and I saw that a URP render asset was listed as private and hence not pushed to the repo. There was a bunch of other stuff (much of it was tutorial files that I did want to play with on the other machine), so I just checked in everything.
However, now when I open the project on the other machine it doesn’t show any of my objects (only shows default Main Camera and Directional Light), and there are 3 errors:
- The layout "/Users/jeffwi/Library/Preferences/Unity/Editor-5.x/Layouts/current/default-2022.dwlt" could not be fully loaded, this can happen when the layout contains EditorWindows not available in this project.
UnityEditor.WindowLayout:LoadDefaultWindowPreferences () (at /Users/bokken/build/output/unity/unity/Editor/Mono/GUI/WindowLayout.cs:87)
- XR Plug-in Management Warning: Timeout trying to get package list after 30s.
UnityEditor.EditorApplication:Internal_CallUpdateFunctions () (at /Users/bokken/build/output/unity/unity/Editor/Mono/EditorApplication.cs:381)
- System.Exception: HTTP/1.1 401 Unauthorized
UnityEngine.Debug:LogError (object)
Unity.Services.Vivox.Editor.VivoxApiClient/<>c__DisplayClass15_0`1<Unity.Services.Vivox.Editor.TokenExchangeResponse>:<CreateJsonResponseHandler>g__JsonResponseHandler|0 (UnityEngine.AsyncOperation) (at ./Library/PackageCache/com.unity.services.vivox@16.5.0/Editor/VivoxApiClient.cs:242)
UnityEngine.AsyncOperation:InvokeCompletionEvent () (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/AsyncOperation.cs:21)
I feel like I’m getting down a rabbit hole here. Is it possible to make a share-able project using this template, or is it not supported for some reason?
Am I supposed to manually install some packages after I pull down the files from source control?
miyii
19
Wonderful template! I tried to build VR multiplayer project based on open VR with Htc Vive pro, and I met a lot of problems. I think this template would help me so much!
I expect that it will have a strong physics engine for team work.
1 Like
Joegre
20
First red flag I see is that you are using Vivox 16.5. The VR MP Template uses Vivox 16.4 and I think there is currently some incompatibility issues with 16.5. First thing I’d suggest is rolling back to 16.4.
What version of Unity are you using?
When you say “putting it on the cloud” are you talking about putting it into source control? Or are you talking about Game Server Hosting?
If by cloud you simply mean Source Control, then that should work no problem. I have a number of personal projects that are based off the VR Multiplayer Template and those are all hosted on a git repo with no issues. What type of source control are you using?
Thanks for the response and ideas.
I was talking about using the built in source control (UVCS).
After about a day of trying various things, I finally got it working by using Git instead (with a reasonable .gitignore file).
Also, one issue I ran into is when loading the project from source control (either UVCS or Git), the scene wouldn’t open so I had to manually search for it and open. But that wasn’t the main problem with building I had run into.
(Note: I also upgraded to 2022.3.46f1, but not sure if that is one thing that helped.)