Is Event PostLogin called automatically during testing?

In the content example “Network Features,” it seems like a login event is never explicitly initiated. Is this something that happens behind-the-scenes when starting the game from the editor with multiple clients?

I see the PostLogin event in the GameMode blueprint to then handle the client connections and pawn assignment, but don’t see any scripts that make these connection attempts.

Post login is a function that is provided for you which will give you a reference to the new player controller that entered the game. At that point this player already joined the server.

When testing with multiple clients in editor one is opened as listen server, the others automatically joined that server as clients.

Those are ready to go utility functions provided by the engine and are written in C++. If you want more access or control over networking you will have to migrate over to C++ as well… which is for the better anyway. Keep in mind that Blueprint is significantly slower than C++ and when handling networking for multiplayer you want to reduce the delay as much as possible which then again means you should use as little as possible blueprint for networking itself.

I understand that and will be doing networking in C++. My question more revolved around the editor functioning with multiplayer during testing. You said " At that point this player already joined the server." So my question was, the connection attempt is made automatically when hitting the play button in editor then? I don’t see any C++ classes referenced in the project which actually initiate and handle the login. I only see the post login, which is called obviously after this connection has happened.

Basically I’m saying, the PostLogin event should run after a client connects. Is there code specifically in that project initiating the connection for the clients, or is that login code automatically ran in engine when you hit “play”?

Sorry, to be more clear, I assume when you hit play, the client is automatically connected via command line during testing:

\game.uproject 127.0.0.1 -game

Yes?

I’m not entirely sure how exactly it connects. But as for the relevant part when you play some level as I said it opens a listen server and connects.

I never tried if I could connect with a standalone to that server. It might not be hosted on localhost but something engine intern. I really have no idea as it wasn’t relevant for me so far.

But it doesn’t need any coding for the clients to connect. This is done automatically in the editor for that type of testing. Later for your standalones you will have to do that yourself.