Skip to main content
Skip table of contents

Send Data from Unreal App (sender) to Webpage (receiver)

In this guide, you will learn how to send data from your Unreal Engine (UE) application to a webpage using the Eagle 3D Streaming system.

In the UE app, if you send any JSON object that doesn't include the type property, it will be caught by the window.e3ds.onEvent function.

You can send a JSON object like the following:

CODE
{"cmd":"run","room":"dining room"}

 

  1. To send JSON from your Unreal project as a Pixel Streaming response, add the Pixel Streamer Input to the Player Controller of your project with the Pixel Streaming Plugin enabled in your Project.

 

  1. In the blueprint where you want to set this up (Actor/Pawn), create a function called Send Pixel Streaming Response and define a string variable named Pixel Streaming Response String.

 

  1. In the function you can retrieve the reference of the Pixel Streaming Component from the Player Controller using the Actor > Get Component by the Class node.

 

  1. Click the Component Class input, and look for the PixelStreamingInputComponent in the list.

 

  1. Set the JSON response you want to send in the Pixel Streaming Response String and call the Send Pixel Streaming Response function on event where needed.

Example of a JSON object:
{"cmd":"run","room":"dining room"}

This will go in Pixel Streaming Response String variable.

You can handle this event by setting an event listener like the following:

CODE
window.e3ds.onEvent("run", (data) => {
	console.log("Raven is running in the " + data.room);
});

The above code will just print, Raven running in the dining room.

 


Need help?

🛠️ Contact our Support Team

💬 Join the Community on Discord

🆓 Get Started for free

 

Follow us on:

Facebook | GitHub | LinkedIn | YouTube

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.