SlideShare a Scribd company logo
UNITY GAME DEVELOPMENT
Multiplayer Networking
CLASS OVERVIEW
 Class 12 Revision
 UNet Deprication
 Server Client Model
 NetworkManager
 NetworkManagerHUD
 NetworkBehaviour
 NetworkIdentity
 isLocalPlayer, isServer
 NetworkTransform
 NetworkTransformChild
 NetworkAnimator
 [Command]
 [ClientRpc]
REVISION
 Team Collaboration
 Source Control
 SourceTree & BitBucket
 Create a Repository
 Setting up Unity for Source Control
 Creating a .gitignore file
 Commit, Push & Pull
 Creating a First Person Camera
 Movement with First Person Camera
 Shooting
 Inverse Kinematics (IK)
 Weapon Recoil
 Shoot effects & Bullet impacts
 Crouching
 Additional features
UNET DEPRICATION
 “UNet, Unity’s legacy multiplayer solution, does not meet the needs of many
multiplayer game creators.”
 “To reach the performance, scale, and security goals ofUnity creators, we’ve reached
the difficult decision that completely new technology is required,
including lightweight and fast networking, and a dedicated game server model.”
 More info:
https://support.unity3d.com/hc/en-us/articles/360001252086-UNet-Deprecation-FAQ
SERVER CLIENT MODEL
 Client sends commands (input to Server)
 Server handles commands & synchronizes everything across all clients.
NETWORKMANAGER
 The Network Manager is a component for managing the networking
aspects of a multiplayer game.
 The Network Manager features include:
 Game state management
 Spawn management
 Scene management
 Debugging information
 Matchmaking
 Customization
 More info: https://docs.unity3d.com/Manual/UNetManager.html
NETWORKMANAGERHUD
 The Network Manager HUD (“heads-up display”) provides the basic functions so
that people playing your game can start hosting a networked game, or find and
join an existing networked game.
 Unity displays the Network Manager HUD as a collection of simple UI buttons in
the Game view.
 More info: https://docs.unity3d.com/Manual/UNetManagerHUD.html
NETWORKBEHAVIOUR
 NetworkBehaviour scripts work with GameObjects that have a Network
Identity component.
 These scripts can perform high-level API functions such as Commands,
ClientRPCs, SyncEvents and SyncVars.
 With the server-authoritative system of the Unity Network System, the server
must use the NetworkServer.Spawn function to spawn GameObjects with
Network Identity components.
 Spawning them this way assigns them a NetworkInstanceId and creates them on
clients connected to the server.
 More info: https://docs.unity3d.com/Manual/class-NetworkBehaviour.html
NETWORKIDENTITY
 The Network Identity component is at the heart of the Unity networking high-
level API.
 It controls a GameObject’s unique identity on the network, and it uses that
identity to make the networking system aware of the GameObject.
 More info: https://docs.unity3d.com/Manual/class-NetworkIdentity.html
ISLOCALPLAYER, ISSERVER
 isLocalPlayer =This returns true if this object is the one that represents the player
on the local machine.
 isServer =True if this object is running on the server, and has been spawned.
NETWORKTRANSFORM
 The Network Transform component synchronizes the movement and rotation
of GameObjects across the network.
 Note that the network Transform component only synchronizes spawned
networked GameObjects.
 More info: https://docs.unity3d.com/Manual/class-NetworkTransform.html
NETWORKTRANSFORMCHILD
 The NetworkTransform Child component synchronizes the position and rotation
of the child GameObject of a GameObject with a NetworkTransform component.
 You should use this component in situations where you need to synchronize an
independently-moving child object of a Networked GameObject.
 To use the NetworkTransform Child component, attach it to the same parent
GameObject as the NetworkTransform, and use the Target field to define which
child GameObject to apply the component settings to.
 You can have multiple NetworkTransform Child components on one parent
GameObject.
 More info: https://docs.unity3d.com/Manual/class-NetworkTransformChild.html
NETWORKANIMATOR
 The Network Animator component allows you to synchronize animation states
for networked objects. It synchronizes state and parameters from
an AnimatorController.
 Note that if you create a Network Animator component on an empty
GameObject, Unity also creates a Network Identity component and
an Animator component on that GameObject.
 More info: https://docs.unity3d.com/Manual/class-NetworkAnimator.html
[COMMAND]
 Commands are sent from player objects on the client to player objects on the
server.
 For security, Commands can only be sent fromYOUR player object, so you cannot
control the objects of other players.
 To make a function into a command, add the [Command] custom attribute to it,
and add the “Cmd” prefix.
 This function will now be run on the server when it is called on the client.
 Any arguments will automatically be passed to the server with the command.
 More info: https://docs.unity3d.com/Manual/UNetActions.html
[CLIENTRPC]
 ClientRpc calls are sent from objects on the server to objects on clients.
 They can be sent from any server object with a NetworkIdentity that has been
spawned.
 Since the server has authority, then there no security issues with server objects
being able to send these calls.
 To make a function into a ClientRpc call, add the [ClientRpc] custom attribute to
it, and add the “Rpc” prefix.
 This function will now be run on clients when it is called on the server. Any
arguments will automatically be passed to the clients with the ClientRpc call.
 More info: https://docs.unity3d.com/Manual/UNetActions.html
Q&A
 Do you have any questions related to the topics mentioned?

More Related Content

PPTX
Unity networking
PDF
Moving pixels on someone else's screen: introduction to Unity networking
PPTX
Developing Multiplayer Games in Unity3D
PPTX
Photon Session / Unite12 Conference
PDF
38199728 multi-player-tutorial
PDF
Building Multiplayer Games (w/ Unity)
PPTX
Game Networking for Online games
PDF
Introduction to the Unreal Development Kit
Unity networking
Moving pixels on someone else's screen: introduction to Unity networking
Developing Multiplayer Games in Unity3D
Photon Session / Unite12 Conference
38199728 multi-player-tutorial
Building Multiplayer Games (w/ Unity)
Game Networking for Online games
Introduction to the Unreal Development Kit

Similar to Unity Class 13 Presentation - . (20)

PDF
Lets Play Together
PDF
Akka for realtime multiplayer mobile games
PDF
Akka for realtime multiplayer mobile games
PDF
Scalability & Big Data challenges in real time multiplayer games
PPTX
Networking Architecture of Warframe
PPTX
A Practical Architecture Design for MMO Casual Game
PPTX
OGDC2012 A Practical Architecture Design For MMO Casual Game_Mr. An, Ngo Thai
PPTX
Gdc gameplay replication in acu with videos
PDF
Developing a Multiplayer RTS with the Unreal Engine 3
PPT
Multiplayer Games Chapter 6 Network Topologies.ppt
PDF
Tech solutions and tricks in real time mobile multiplayer
PDF
Jan Hloušek, Keen Software House
PPTX
unity gaming programing basics for students ppt
PDF
Game network programming
PPTX
How MADFINGER is leading next-gen multiplayer mobile FPS games - Unite Copenh...
PDF
AI For Gaming lecture2 Unity and c# basics.pdf
PPT
Realtime html5 multiplayer_games_with_node_js
PDF
Presentación Unity
PPTX
A practical architecture design for MMO casual game
PPTX
A practical architecture design for mmo casual game
Lets Play Together
Akka for realtime multiplayer mobile games
Akka for realtime multiplayer mobile games
Scalability & Big Data challenges in real time multiplayer games
Networking Architecture of Warframe
A Practical Architecture Design for MMO Casual Game
OGDC2012 A Practical Architecture Design For MMO Casual Game_Mr. An, Ngo Thai
Gdc gameplay replication in acu with videos
Developing a Multiplayer RTS with the Unreal Engine 3
Multiplayer Games Chapter 6 Network Topologies.ppt
Tech solutions and tricks in real time mobile multiplayer
Jan Hloušek, Keen Software House
unity gaming programing basics for students ppt
Game network programming
How MADFINGER is leading next-gen multiplayer mobile FPS games - Unite Copenh...
AI For Gaming lecture2 Unity and c# basics.pdf
Realtime html5 multiplayer_games_with_node_js
Presentación Unity
A practical architecture design for MMO casual game
A practical architecture design for mmo casual game
Ad

Recently uploaded (20)

PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
Computer Software and OS of computer science of grade 11.pptx
PPTX
ai tools demonstartion for schools and inter college
PDF
Understanding Forklifts - TECH EHS Solution
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PPTX
Introduction to Artificial Intelligence
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
top salesforce developer skills in 2025.pdf
PDF
System and Network Administraation Chapter 3
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PPTX
history of c programming in notes for students .pptx
PPTX
L1 - Introduction to python Backend.pptx
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PPT
Introduction Database Management System for Course Database
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Computer Software and OS of computer science of grade 11.pptx
ai tools demonstartion for schools and inter college
Understanding Forklifts - TECH EHS Solution
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
How to Choose the Right IT Partner for Your Business in Malaysia
Introduction to Artificial Intelligence
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Operating system designcfffgfgggggggvggggggggg
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
top salesforce developer skills in 2025.pdf
System and Network Administraation Chapter 3
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Design an Analysis of Algorithms I-SECS-1021-03
history of c programming in notes for students .pptx
L1 - Introduction to python Backend.pptx
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
Introduction Database Management System for Course Database
Ad

Unity Class 13 Presentation - .

  • 2. CLASS OVERVIEW  Class 12 Revision  UNet Deprication  Server Client Model  NetworkManager  NetworkManagerHUD  NetworkBehaviour  NetworkIdentity  isLocalPlayer, isServer  NetworkTransform  NetworkTransformChild  NetworkAnimator  [Command]  [ClientRpc]
  • 3. REVISION  Team Collaboration  Source Control  SourceTree & BitBucket  Create a Repository  Setting up Unity for Source Control  Creating a .gitignore file  Commit, Push & Pull  Creating a First Person Camera  Movement with First Person Camera  Shooting  Inverse Kinematics (IK)  Weapon Recoil  Shoot effects & Bullet impacts  Crouching  Additional features
  • 4. UNET DEPRICATION  “UNet, Unity’s legacy multiplayer solution, does not meet the needs of many multiplayer game creators.”  “To reach the performance, scale, and security goals ofUnity creators, we’ve reached the difficult decision that completely new technology is required, including lightweight and fast networking, and a dedicated game server model.”  More info: https://support.unity3d.com/hc/en-us/articles/360001252086-UNet-Deprecation-FAQ
  • 5. SERVER CLIENT MODEL  Client sends commands (input to Server)  Server handles commands & synchronizes everything across all clients.
  • 6. NETWORKMANAGER  The Network Manager is a component for managing the networking aspects of a multiplayer game.  The Network Manager features include:  Game state management  Spawn management  Scene management  Debugging information  Matchmaking  Customization  More info: https://docs.unity3d.com/Manual/UNetManager.html
  • 7. NETWORKMANAGERHUD  The Network Manager HUD (“heads-up display”) provides the basic functions so that people playing your game can start hosting a networked game, or find and join an existing networked game.  Unity displays the Network Manager HUD as a collection of simple UI buttons in the Game view.  More info: https://docs.unity3d.com/Manual/UNetManagerHUD.html
  • 8. NETWORKBEHAVIOUR  NetworkBehaviour scripts work with GameObjects that have a Network Identity component.  These scripts can perform high-level API functions such as Commands, ClientRPCs, SyncEvents and SyncVars.  With the server-authoritative system of the Unity Network System, the server must use the NetworkServer.Spawn function to spawn GameObjects with Network Identity components.  Spawning them this way assigns them a NetworkInstanceId and creates them on clients connected to the server.  More info: https://docs.unity3d.com/Manual/class-NetworkBehaviour.html
  • 9. NETWORKIDENTITY  The Network Identity component is at the heart of the Unity networking high- level API.  It controls a GameObject’s unique identity on the network, and it uses that identity to make the networking system aware of the GameObject.  More info: https://docs.unity3d.com/Manual/class-NetworkIdentity.html
  • 10. ISLOCALPLAYER, ISSERVER  isLocalPlayer =This returns true if this object is the one that represents the player on the local machine.  isServer =True if this object is running on the server, and has been spawned.
  • 11. NETWORKTRANSFORM  The Network Transform component synchronizes the movement and rotation of GameObjects across the network.  Note that the network Transform component only synchronizes spawned networked GameObjects.  More info: https://docs.unity3d.com/Manual/class-NetworkTransform.html
  • 12. NETWORKTRANSFORMCHILD  The NetworkTransform Child component synchronizes the position and rotation of the child GameObject of a GameObject with a NetworkTransform component.  You should use this component in situations where you need to synchronize an independently-moving child object of a Networked GameObject.  To use the NetworkTransform Child component, attach it to the same parent GameObject as the NetworkTransform, and use the Target field to define which child GameObject to apply the component settings to.  You can have multiple NetworkTransform Child components on one parent GameObject.  More info: https://docs.unity3d.com/Manual/class-NetworkTransformChild.html
  • 13. NETWORKANIMATOR  The Network Animator component allows you to synchronize animation states for networked objects. It synchronizes state and parameters from an AnimatorController.  Note that if you create a Network Animator component on an empty GameObject, Unity also creates a Network Identity component and an Animator component on that GameObject.  More info: https://docs.unity3d.com/Manual/class-NetworkAnimator.html
  • 14. [COMMAND]  Commands are sent from player objects on the client to player objects on the server.  For security, Commands can only be sent fromYOUR player object, so you cannot control the objects of other players.  To make a function into a command, add the [Command] custom attribute to it, and add the “Cmd” prefix.  This function will now be run on the server when it is called on the client.  Any arguments will automatically be passed to the server with the command.  More info: https://docs.unity3d.com/Manual/UNetActions.html
  • 15. [CLIENTRPC]  ClientRpc calls are sent from objects on the server to objects on clients.  They can be sent from any server object with a NetworkIdentity that has been spawned.  Since the server has authority, then there no security issues with server objects being able to send these calls.  To make a function into a ClientRpc call, add the [ClientRpc] custom attribute to it, and add the “Rpc” prefix.  This function will now be run on clients when it is called on the server. Any arguments will automatically be passed to the clients with the ClientRpc call.  More info: https://docs.unity3d.com/Manual/UNetActions.html
  • 16. Q&A  Do you have any questions related to the topics mentioned?