Download

How to correctly work with databases in ue4?

Hi!

I want to use a database to handle bans and playerinfo. My idea was to check in whether a player is banned in PreLogin and deny the client even before it loads the map.
I have not really spend much time getting to know how ue4 works but I think while my database query gets processed the game thread must wait for the sql server until it can continue working; so my server might become unresponsive (maybe even some seconds if the sql server is slow).
My second idea was to handle the database stuff in the seperated thread and let it take its time (I have to step away from the PreLogin thing then).
I read the thread tutorial by Rama but I fail to get this set up properly and I am not sure how to communicate with the thread (this is so easy in java XD).
Is there an easier way or did I commit a fallacy?

Cheers,
Th120