02.2.1. Sending and Receiving Json messages
Using the Arcware Pixel Streaming Template Project - Getting Started - Arcware Blueprints - Arcware Player Controller
In the BP_Arcware_Player_Controller blueprint you will see pre-existing blueprint nodes for handling the receiving/sending of Json messages. The content/wording of the Json messages should be agreed upon between the web frontend developer and Unreal Engine developer, as both sides need to be aware of the possible Json messages it's receiving before anything can be triggered. A typically workflow example of a Json message being sent to Unreal Engine would be... 1) User clicks button in frontend 2) Frontend sends Json message to Unreal Engine application i.e...
3) Unreal Engine receives this Json message in the Player Controller via the 'Pixel Streaming Input' component
4) Json message is received and the Get Json String Value node searches the message for the pre-determined Field Name... 'Console'. If this Field name is present in the Json message, then the String Value will be used to trigger a Console Command. In this example the String Value would be 'r.setres 1000x2000w'
5) (This step is Optional). After the desired event is triggered, we send a Json message response back to frontend via the Send Pixel Streaming Response node. The content of the message response should be discussed with the frontend developer so they know what to intercept, in this example we just send back the same message as received i.e...
Last updated