Running A Server + Client On The Same Build
If you want to run a Server and a Client on the exact same build, as in the client that is running around is also the host of the server, there are a few things that you need to know and do in order to set this up.
What You Give Up
While Server+Client is convienant is also leads to potential server code decompilation.
What is decompilation?
This is when a user that has gotten a copy of your game decompiles your game down to it's source code. They then look through your source code and build exploits and hacks around the server source code in order to cheat or do things worse to your server. I have taken care of this for you by NOT actually building ANY of the server code into client builds. However, if you continue and enable the Server+Client mode (Host Mode) you will no longer have decompilation protection enabled. This will allow a client to decompile both the client code and the server code.
You have been warned!
Enabling Server+Client (Host Mode)
To enable the Server+Client (Host mode) is easy. Open the following menu:
Easy Multiplayer - Invector/Open Settings Window
Then you just need to click Enable Host Mode.
NOTE: This gives you a warning about what you are giving up when enabling this. Be sure to read the section title "What You Give Up" above for more details.
After clicking that, force unity to recompile by clicking out of the unity window and back into it. Wait for that to complete. Now the Server + Client mode will work properly in builds.