GameMode PreLogin Event?

I’m using GameMode with the parent class of (GameMode).

I’d like to validate a users token passed via options on load level to see if they’re allowed on the server, but I can’t seem to expose the PreLogin event to Blueprints? Any suggestions would be greatly appreciated.

You have to create a new C++ class inheriting AGameMode and override the PreLogin function. Then, either use the new class as your active GameMode or base class of your current BP_GameMode.

Thank you for the reply. Would it be reasonable to create a mechanism where the PreLogin C++ function calls a Blueprint-implementable event?

You’ll want to do this before the server is selected to join. Match Making is where this should be.

My flow is:

  1. Client logs in via HTTP request
  2. Client receives and stores access token & and IP:PORT of server to connect to from REST API.
  3. Client should then connect to IP:PORT(Unreal Dedicated Server) and pass their token for validation

Is #2 considered the match making? I’d assume I’d pass the token via options in OpenLevel on the client, which would be picked up in PreLogin?

Matchmaking (MM) is a sub-service that’s not a part of the game server. Steam and EOS have these.

MM in general is a server filtering service that provides applicable servers the client can join based on set criteria. So any validation processes per client would be executed here.

You do not want clients connecting to a server, validating then getting kicked. That’s bad design and bad for the server. They should only ever connect if they can actually play.

Ok, is there a platform agnostic system?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.