Player Connect Wallet

To enable players to Connect their Stacks Wallet (Leather or Xverse) to your UE5 based game. We will start with a Custom Event handler for the On Click of our Connect Wallet button.

"Connect" Clicked

The user clicks the "Connect Wallet" button, which is wired to a Launch URL node (eg upon click GET your Bridge app URL at something like, check out the Prerequisites for more info regarding the Bridge app)

Note: You can pass to a Print String node for debugging purposes.

"Confirm" Clicked

After the player clicks Confirm in their Wallet. Your Bridge app will invoke the Authentication Response Call Back to your Game. Your Game client needs to be Listening for the Call Back, handling the Authentication Response.

Here you can see (top part of the screenshot) in our Event Graph of our WB_MainMenu, after our Main Menu is Constructed, we instantiate and set our HTTP Server as a variable (this is courtesy of the already installed BlueprintHttpServer plugin) and wire it to our two needed routes (POST and OPTIONS) and wired to our Listen node at 127.0.0.1:8080 During the Authentication Response handling, your game will first need to handle the preflight check. This is required and acts as a safety check. The preflight request for the http OPTIONS is handled by setting the Headers (variable type Map of Strings)

Next handle the POST where we can extract the users session details, such as the userSession.loadUserData.profile.stxAddress.mainnet from our body payload Storing and using the mainnet address as a game variable. (see Player BNS for more information regarding storing and making use of the players mainnet address)

See the Video Demo for Example of the Player UX for when the Player Connects their Wallet