Version number check for games built with UE4?

Hi!

Is there any version check built into the UE4? If you e.g. try to join a server with an old client, will the server be able to reject the connection automatically or do I have to implement this feature? How do I change the version number of my game if it’s supported already?

There is indeed, using the control channels. Control channels are what you use to establish the first interaction within the Unreal Network Protocol, is features a set of message types and one is to make sure that a client is not able to connect to a server that is not suitable to him.

The channel you are looking for it NMT_Upgrade. The engine uses the ProjectVersion located in your ProjectSettings, your ProjectName and the GEngineNetVersion global and hashes them together. By default the client and server hash needs to match or a NMT_Upgrade message is send to the connecting client resulting in a disconnect.

You can handle the version checks on your own binding the IsNetworkCompatibleOverride delegate of FNetworkVersion to you own handler. You can also bind the GetLocalNetworkVersionOverride delegate of FNetworkVersion to use your own version system, for instance a simple int so that different version can connect together.

Cheers,
Moss

Nice! Remember to accept the answer :smiley:

Okay I see. Thanks a lot for the explanation.