Adding multiplayer networking
To make the scene run as multiplayer we need, at a minimum, a Network Manager component, and we need to identify any objects that will get spawned using the Network Identity component.
Network Manager and HUD
First, we'll add the Network Manager component, as follows:
- Navigate to GameObject | Create Empty and rename it
NetworkController
. - Navigate to Add Component | Network | Network Manager.
- Navigate to Add Component | Network | Network Manager HUD.
We also added a Network Controller HUD menu, a crude default menu that Unity offers to select the runtime networking options (you can see it in the images that follow). It's for development. In a real project, you'll probably replace the default HUD with something more appropriate. ...
Get Unity Virtual Reality Projects now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.