Search code examples
unreal-engine4unreal-blueprint

How to destroy all Client-Sessions, when the Host leaves the game in Unreal Engine 4


basically what the title says. I'm currently developing a multiplayer game in unreal(listen-server) and I want to know how to disconnect all Clients from the session, when the host ends the Session.(I'm currently doing it, when the client tries to join a session, if it fails, just destroy the session and retry, but I think that's "a little bit more than inefficient".). How can I properly end all client game sessions.


Solution

  • You can do something like this:

    enter image description here

    If you're the P2P server (not dedicated), then the server tells all the clients to disconnect (including itself).