Unity Server
FigNet can also run as a server embedded directly inside a Unity project.

Import FigNetCore.package in your project. Go to Player Settings and set Api Compatibility Level to NET 4.x.
Open FigNetSampleScene and press the play button.
note
- ServerManager.cs: starts an
IServerSocketinstance based on theServerConfig.xmlfile - ClientManager.cs: starts an
IClientSocketinstance based onServerConfig_Client.xml - Bootstrap.cs: registers the
EchoHandler
important
When you have a Unity embedded server, use different OpCodes for Server and Client handlers, since FN.HandlerCollection is shared between Server and Client handlers, to keep down overall complexity.