How to test server client?
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?
asked Jan 08 '16 at 10:49 AM in C++ Programming
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.
answered Jan 08 '16 at 01:11 PM
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.
answered Jan 11 '16 at 08:40 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here