Reader small image

You're reading from  Unity Virtual Reality Projects

Product typeBook
Published inSep 2015
Reading LevelIntermediate
PublisherPackt
ISBN-139781783988556
Edition1st Edition
Languages
Right arrow
Author (1)
Jonathan Linowes
Jonathan Linowes
author image
Jonathan Linowes

Jonathan Linowes is a VR/AR enthusiast, Unity, and full stack developer, entrepreneur, certified Unity instructor, and the owner of Parkerhill XR Studio, an immersive media, applications, and game developer. Jonathan has a bachelor of fine arts degree from Syracuse University, a master of science degree from the MIT Media Lab, and has held technical leadership positions at Autodesk and other companies. He has authored multiple books on VR and AR published by Packt Publishing.
Read more about Jonathan Linowes

Right arrow

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:

  1. Navigate to GameObject | Create Empty and rename it NetworkController.

  2. Navigate to Add Component | Network | Network Manager.

  3. 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.

Network Identity and Transform

Next, add a Network Identity to the Avatar prefab. We will also add a Network Transform, which instructs the networking system to synchronize the player's Transform values to the avatar instances on each client,...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Unity Virtual Reality Projects
Published in: Sep 2015Publisher: PacktISBN-13: 9781783988556

Author (1)

author image
Jonathan Linowes

Jonathan Linowes is a VR/AR enthusiast, Unity, and full stack developer, entrepreneur, certified Unity instructor, and the owner of Parkerhill XR Studio, an immersive media, applications, and game developer. Jonathan has a bachelor of fine arts degree from Syracuse University, a master of science degree from the MIT Media Lab, and has held technical leadership positions at Autodesk and other companies. He has authored multiple books on VR and AR published by Packt Publishing.
Read more about Jonathan Linowes