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

Creating the tank prefab and configuring the network lobby manager

Now that we have created our Tank GameObject and attached all of the necessary components and scripts to it, we need to make a prefab of it. This is because we will let NetworkLobbyManger spawn our player character, and in order for it to be able to do so, it needs to refer to a prefab that is a representation of your player character.

The NetworkLobbyManager has a Spawn Info section that you can assign the Player Prefab, determine if the NetworkLobbyManager can Auto Create Player and the Player Spawn Method.

There is also a section for Registered Spawnable Prefabs. We need to register all of the GameObjects that will be spawned by the NetworkServer. For instance, the Canon ...

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