Creating A Server Authoritative Game System Using Unity’s NEW Transport Layer | Part 3

Nicholas Namusanga
1 min readJul 24, 2020

Understanding Message Handlers-

This is the last portion before we move on to the lower-level transport layer and actually create a game server and client from scratch.

Creating The Handler Class

Now we shall proceed to create the class that will be in charge of handling notification messages from the server. Create a new class and put the following functionality in it.

Let me explain.

Now you needn’t forget to go back to the GameClient.cs and make sure to remove the function we created earlier and also unregistered from the callbacks. That update should leave the game client looking like this.

Now that we’ve learned how messages are handled on a higher level, you have a solid enough understanding to go on and actually look at building such a system from the ground up.

In The Next Post

In the next post, we’re going to start afresh with a new project. We will set up the complete networking system that we have been using in the previous posts from the beginning and set up a method that will allow us to send and receive messages and also validate client moves against server logic.

--

--