Communication with a viewport browser is the same except for where the difference is specified.
Sending a message from the browser to the game
We'll add a feature that on clicking a button in the browser, we'll print the text input provided in the browser in the game client.
[todo]
Sending a message from the game to the browser
We'll add a feature that will display the player's XYZ position in the browser.
First, make a blueprint structure called SPosition with the parameters X Y Z. We'll use this to serialize the vector into a JSON struct.
In your browser widget blueprint, add the following nodes. This will call the function setPlayerPosition in the browser every tick alongside the player's location as a struct.