Is there a WITH_CLIENT_CODE check for code not needed by the server?

Hey,

I know there is something called WITH_SERVER_CODE, but is there a WITH_CLIENT_CODE.
I have some code that only the client needs to know about.

Thanks in advance :slight_smile:

i don’t think that they have this, but you can check Role of the Actor if Role = Role_Authority then it server, if not then it client.

Yeah I know, But the problem is that the server creates unnecessary memory in the class(header) that it will never use.

Cheers mate

You can use #if !UE_SERVER to guard parts of code which should not be compiled for dedicated servers.