Hi, I’m struggling with something a little bit and I would like to know what is the best practice or common approach to achieve this with the engine before I write more code.
I understand that I can use WITH_SERVER_CODE define when building with dedicated server configuration but right now as I’m developing I don’t have such define set and I have to check whether code is run on the server or client meaning I will have a lot of authority checks which implies that further down the road, when I actually build the game and server, those will have to be replaced by an ifndef WITH_SERVER_CODE in order to not expose server code to clients and getting rid of overhead and code that will never execute. That will require quite a lot of work, is it there another way?

No, if you want to exclude code, you have to use the macros. Usually it’s easier if you do this right from the start of the project, because you’d be amazed what bugs you create by doing it.

Also, I thought the macro was UE_SERVER

Sorry I dont know why I can’t reply and I never got notified about this thread and also couldn’t find it and assumed it never actually posted.
Thank you for your advice regarding the use of the macro. I will start with it from the begining of the project since now I’m just testing different features.