'Passing Local Storage to Unreal Clien

I'm working on a BSC blockchain game developed in unreal. The game itself right now is hosted via a NodeJS server for multiplayer purposes.

The game is a simple card game, with people being able to access special cards in-game for holding ERC20 tokens. The game will be run in a react application, either in an iframe or using the unreal HTML5 package.

There is no need to "write" to blockchain, but a permissioned read is important. Essentially, I think it makes the most sense for people to connect to the blockchain via the react app, this is something I already have. If they're connected to blockchain via the react app, and they have those ERC20 tokens, the game will let them utilize the special cards.

There aren't any plugins or straight forward solutions that I am aware of for the specific BSC/unreal combination.

I've been exploring a few ways to do this, including:

  1. Game itself makes a Web3 request to get the data
  2. Nodejs Authoritative Server for the game can get blockchain data, user has to pair the unreal client to the wallet (not preferable for UX)
  3. Web3 connections are stored in browser local storage, could the unreal client detect that data from the player's specific browser if detected and load the relevant info?

Option #3 would be the most ideal, but I haven't been able to find documentation on how an unreal game could listen/fetch data on the client side for local storage such as the web3 connection.

Anyone have any suggestions or advice on what to research? Is it possible to have and unreal client pull local browser data?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source