Which one should I use when writing server only code ?
AFAIK UE_SERVER code is still compiled even in non-server builds but WITH_SERVER_CODE is only compiled in server-builds.
Are you sure about that? I’ve been always thinking that it’s the opposite. UE_SERVER checks if it’s a Server build. And WITH_SERVER_CODE checks if server code is allowed for this build, for example:
Game: UE_SERVER=0, WITH_SERVER_CODE=1
Server: UE_SERVER=1, WITH_SERVER_CODE=1
Client: UE_SERVER=0, WITH_SERVER_CODE=0
Can anyone confirm?
You are right I seem to have gotten it backwards.