- Home /
Initialize server automatically but not the client
I'm trying to figure out how to build two versions of the same project as easily as possible.
I want one build to be for server that initializes it without requiring any user input and other to display client version with the menu for connecting.
Right now I'm using a bool variable that I will manually set as true or false based on if I want the build to be for server or client and then compile both of the builds.
It works, but is there something more convenient?
Answer by Chris_Dlala · Jun 11, 2014 at 08:51 PM
Hi, my suggestion would be to look into Custom Define Symbols (described here). You could have symbols CLIENT and SERVER to allow you to build only the code needed for each. This would mean that a choice could not be made at runtime and the application built to be a server would not have the code to be a client and vice versa. I hope that helps =)
Thanks! Exactly what I was looking for. Now I just need to figure out best way to compile those two builds without having to change the define symbols manually all the time.
Your answer
Follow this Question
Related Questions
[Network] Authorative Server for MMO 0 Answers
Download pictures and store them temporarily 1 Answer
How do you locate a Network.player? 0 Answers
My network server doesn't work. 0 Answers