x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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?

Product Version: UE 4.10
Tags:
more ▼

asked Jan 08 '16 at 10:49 AM in C++ Programming

avatar image

Sleicreider
165 35 34 47

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

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.

https://wiki.unrealengine.com/Log_Macro_with_Netmode_and_Colour

Best regards.

more ▼

answered Jan 08 '16 at 01:11 PM

avatar image

nan2cc
507 23 14 38

avatar image Sleicreider Jan 12 '16 at 01:05 PM

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

avatar image Sleicreider Jan 12 '16 at 01:07 PM

somehow i can't write double underscores

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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.

more ▼

answered Jan 11 '16 at 08:40 AM

avatar image

thyshimrod
399 22 11 39

avatar image Sleicreider Jan 12 '16 at 01:07 PM

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

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question