How to test server client?

Hey,

I’ve recently started learning about the ue4 server client functionality, but I have no idea how to test my replicated variable and server function.

As far as i know its possible to enable Dedicated server inside the editor and change the amount of clients.
But how do I see if a function got called on the server?

Hi Sleicreider

Well, the easy way to see if some method is called on server or on clients or on both is with logs. If you are using blueprint the Print String node in multiplayer show you where was called that funtion, for example: Server: my log text or Client: my log text.

On the other hand, for logs in C++ I use the following macro that also show me the same information.

Best regards.

Personnaly to test, I launch ue4_sourcedirectory_from_git\engine\binaries\win64\ue4editor myproject mystartingmap -server -log
and ue4_sourcedirectory_from_git\engine\binaries\win64\ue4editor myproject mystartingmap -game -log

you will have a dos prompt with all logs. So you have no “automatic connect”, and some tricky behaviour found in PIE. you have more “real network likfe”.

All “print string” done on server side, will be shown in this dos console log.

this works for me
had to modify it, because FUNCTION / function is not available on OS-X.

somehow i can’t write double underscores

I’m not sure how to get it working on OS-X, i’ll try it at home on windows

Link broken, should now be: Log Macro with Net Mode and Color | Unreal Engine Community Wiki