host a multiplayer session on PC Editor
Is it possible to have a multiplayer session on Quest with events happening triggered from my Unity Editor.
I want to demo something and I want to have more control. For example, it's a networked club, can I skip through songs with editor buttons, can I control lightning from my editor. Making my PC technically the DJ booth?
This would be useful because I don't want to map all functionalities to my controllers, I just want to host on my PC, using NaughtyAttributes Buttons.
What is the downside about this?
Can I make a build for PC where I have an overlay with buttons? What is the limit?
8 Replies
Hi @Mikameel. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Yes, it is possible to host a multiplayer session on PC with your Unity Editor while having Quest devices connect to it, and control various aspects of the experience from the Editor. This setup aligns well with your goal of creating a networked club where your PC acts as the DJ booth. Let's break down the key points:
1. Hosting from Unity Editor:
You can host a Normcore session directly from your Unity Editor on PC. Other devices, including Quests, can connect to this session.
2. Control from Editor:
You can indeed trigger events, skip songs, control lighting, etc., from your Unity Editor while Quest users are connected. This setup allows you to have more complex controls on the PC side without needing to map everything to Quest controllers.
3. Using NaughtyAttributes Buttons:
NaughtyAttributes Buttons in the Unity Editor can be used to trigger these events. However, you'll need to ensure that these actions are properly synchronized across the network using Normcore's features.
4. Downsides:
The main downside to this approach is that your PC needs to remain connected and running the Unity Editor for the entire session. If your PC disconnects, it could disrupt the experience for all connected users.
5. PC Build with Overlay:
Instead of running from the Unity Editor, you could create a PC build with a custom overlay for controls. This would be more stable than running from the Editor. The limit here would mainly be based on your UI design and what controls you choose to implement.
To implement this setup, you'll need to use Normcore's ownership and synchronization features. Here are some key concepts to consider:
1. Ownership: Use Normcore's ownership system to ensure that only your PC (as the "DJ booth") can control certain aspects of the experience.
Ownership and Lifetime Flags explains:
"By default, a model has an
ownerID
of -1
, which denotes that it has no owner. When a model is unowned, it can be modified by anyone in the room. However, when a model is owned by a client, the server only lets the owning client make changes to it or to any of its child models."
2. Synchronization: Use Normcore's synchronization features to ensure that changes made on your PC are reflected for all connected users.
3. RPC-like Events: For one-shot effects or controls, you might want to use Normcore's RPC-like event system.
RPC Events provides a recipe for implementing RPC-like events in Normcore.
Remember to design your system carefully to ensure smooth synchronization and avoid potential conflicts between PC controls and Quest user interactions.
As for the limits of what you can do with a PC build and overlay, it's primarily limited by your design and implementation. You could create a comprehensive control panel with buttons, sliders, and other UI elements to control various aspects of the experience.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@365574199844274177> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
This will work just fine. No downside that I know of
Woah okay thanks @Max this could change the complete way I envisioned this
love the possibilities with normcore
this is how we work. our games team has an FPS player controller so we can test levels out quickly from the editor but you can always make a VR build to test it fully. It was a little work to implement the switching and stuff cleanly but it works well
and FPS players can play with VR players
are there any sample projects for this? or am I overthiking it? I have a playstation 3 controller here.
So hypothetically I could swap the URL for the Unity Video player from a PC. and a videostream for all players in VR will change, if this videoURL is networked.
yes
no samples but we usually just hit play in the editor and have our player controller code check the unity player type to determine whether to sample from VR or a controller
some VR SDKs don’t play nice with running in non-VR mode though so we’ll sometimes have two Unity projects with a SharedAssets folder that’s symlinked between them
that way we can configure controller vs VR specific project settings individually
aaaah makes sense okay! thanks I'll use that too
I use ParrelSync as well.
great! I will try it out!