Get current user from Epic Launcher inside the editor

Hi everyone!

I wanted to know if there is any way to get some info from the user currently logged in the Epic Launcher from inside the editor (could be through Blueprint, Python or any reliable workaround), such as its e-mail or some unique id/token which can be used consistently between different sections.

Thanks in advance!

If you’re using Unreal Engine as part of a pipeline, there’s 2 ways I can think of to get the user.

  1. You might already have the user’s name stored as an environment variable. Generally something like os.environ.get(“USERNAME”).
    just print "
    “.join(”{}: {}".format(k, v) for (k, v) in os.environ.items()]) and see if you can find a unique name in there.

  2. You might be using Shotgun Toolkit. If so:
    import sgtk
    shotgun_authentication = sgtk.authentication.ShotgunAuthenticator()
    user = shotgun_authentication.get_user()

Hope this helps!