Skip to Main Content
Building an RPG with Unity 2018 - Second Edition
book

Building an RPG with Unity 2018 - Second Edition

by Vahé Karamian
July 2018
Intermediate to advanced content levelIntermediate to advanced
366 pages
7h 48m
English
Packt Publishing
Content preview from Building an RPG with Unity 2018 - Second Edition

Networked player character

Go ahead and drag the player prefab you have created into the scene. We will use it as a base to create a new prefab, which will be used for the networked version of the game.

Go ahead and remove the existing BarbarianCharacterController.cs and BarbarianCharacterCustomization.cs components from the instance. We will create new scripts that are network-enabled and use them. Rename the PC GameObject instance to PC-C6-Network. Now make a prefab of the instance. You should now have a new prefab named PC-C6-Network.

Go ahead and attach the following components to the prefab: NetworkIdentiy, NetworkTransform, and NetworkAnimator, by using the Inspector Window and selecting Add Components | Network | <component name>

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Unity 2020 Game Development

Hands-On Unity 2020 Game Development

Nicolas Alejandro Borromeo
Unity 2018 Cookbook - Third Edition

Unity 2018 Cookbook - Third Edition

Matt Smith, Chico Queiroz, Jate Wittayabundit

Publisher Resources

ISBN: 9781788623469Supplemental Content