How to start both a dedicated server and a client instance in the editor?

I am working with dedicated servers. The tutorial I followed involves working with a final packaged game and server. I was able to get this to work, but obviously during development I don’t want to have to package every time to test. I am trying to figure out how to start both a dedicated server and a client instance in PIE.

Here are my PIE settings. When I start PIE the log for the dedicated server shows up and the editor starts as a client. So far so good. There are a couple of problems, however. The client connects to the dedicated server right off the bat with the server’s map and the log shows it connecting.

This is not the behavior I want, though. I would like to start the client as a separate offline instance and then manually connect to the server through the menus I’ve made. However, both the server and client start the game with whatever map is specified by the “Server Map Name Override” flag. If I specify the desired server map (in this case “Town”), then the server starts with Town (which is what I want the server to start as) but then the client automatically connects to Town as well. If I specify the override to be the main menu level, then both open up to the main menu but then the server crashes and the client has a blank screen. The server crash callstack says that the crash occurs after trying to display the main menu onto the viewport, which makes sense because as a dedicated server there is no viewport to display to.

So in essence I’m not sure how to set this up so that the server launches with the desired Town map while the client starts initially offline in the main menu level. Currently no matter what I do they both launch with the same map.

You could let all start on the MainMenu, and on the Level BP ask if its the server, if yes, load/travel another level. If its a client, build the UI.

Also if you start it as Standalone, you shouldn’t have to package it, for testing.