Skip to content

Forge Networking Classic to Remastered Migration Guide

Niels-Ferdinand Mynster edited this page Sep 30, 2018 · 1 revision

The biggest change to Forge Networking is the Network Object. We have replaced the old singular, monolithic inheritance network model in place of an attachment network model. Now you can write your code as you wish without overly intrusive and complicated code/reflection and have a more solid extendable model. We have also included the new Network Contract Wizard (NCW) which allows you to easily blueprint and review your network contracts without having to dig through tons of code. We have completely re-imagined networking to be more of a service, attachment, addon, and extension rather than an overly complex integrated model.

Of course you will find many things that you once knew such as Network Instantiation, Remote Procedure Calls RPC, MainThreadManager (Threading in Unity) however you will find that some of the older models (such as NetSync ) have been removed. I know, I know, NetSync is awesome and it works kinda like UNET's SyncVar ; however, we believe we have a much simpler, more controlled, less magical, and more powerful approach to serializing network variables. Since we have abstracted all the network code to be an attachment, you will find a new fancy network Object variable that is a part of the class you create. This object will house all of your network variables and allow you to set the sync time as well as access any variable from the network easily. This means you can choose when to use the network variable, choices are good, yes?

Also, the networkObject is powerful, it automatically detects changes to your variable (as a whole) and serializes only that variable as opposed to the whole network class!

So, what are the difference highlights?

  • Instantiation is done through NetworkManager.Instance.Instantiate...
  • Remote procedure calls are done through networkObject.SendRpc
  • NetSync has become networkObject.[myVar]
  • PrimarySocket has become NetworkManager.Instance.Networker (You can also get the networker from the networkObject )
  • WriteCustom has become Binary (Check out the VOIP module for how to use Binary) Networking and NetworkingManager have been replaced by NetworkManager
  • So what are some of the new highlights?
  • Network Contract Wizard (NCW)
  • Support for NAT hole punching
  • Master Server has Matchmaking
  • "Cherry picked" network variable updating
  • State rewinding
  • Network error logging system
  • The Network Object


Getting Started
Network Contract Wizard (NCW)
Network Object
Remote Procedure Calls (RPCs)
Unity Integration
Basic Network Samples
Scene Navigation
Master Server
Web Server
Netcoding Design Patterns
Clone this wiki locally
You can’t perform that action at this time.