Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.streampixel.io/llms.txt

Use this file to discover all available pages before exploring further.

The SDK enables bidirectional communication between your web application and Unreal Engine.

Video tutorials

Sending data to UE

UI interaction (custom JSON)

Send arbitrary JSON data to UE. This is the primary method for custom web-to-UE communication.
appStream.stream.emitUIInteraction({
  type: 'action',
  value: 'jump'
});

appStream.stream.emitUIInteraction({
  command: 'setColor',
  color: '#ff0000',
  intensity: 0.8
});
In Unreal Engine, handle these messages using the Pixel Streaming Input Component’s OnInputEvent delegate or the FPixelStreamingInputHandler in C++.

Console commands

Execute Unreal Engine console commands remotely:
// Show FPS counter in UE
pixelStreaming.emitConsoleCommand('stat fps');

// Set resolution
pixelStreaming.emitConsoleCommand('r.SetRes 1920x1080f');

// Other UE console commands
pixelStreaming.emitConsoleCommand('stat unit');
pixelStreaming.emitConsoleCommand('r.ScreenPercentage 100');
Console commands execute with the permissions of the UE application. Only commands that are enabled and allowed in your UE build will work. Ensure your application properly restricts which commands can be executed remotely.

Text input

Send text to UE’s currently focused text field:
pixelStreaming.streamMessageController
  .toStreamerHandlers.get('TextboxEntry')?.(['Hello from the web!']);
This is primarily used in response to UE’s on-screen keyboard request (see below).

Receiving data from UE

Response event listener

Listen for custom messages sent from UE to the web application:
pixelStreaming.addResponseEventListener('handle_responses', (response) => {
  const data = JSON.parse(response);
  console.log('Received from UE:', data);

  // Handle different message types
  switch (data.type) {
    case 'gameState':
      updateGameUI(data.state);
      break;
    case 'notification':
      showNotification(data.message);
      break;
  }
});
In Unreal Engine, send messages using the UPixelStreamingDelegates::SendPixelStreamingResponse function or the equivalent Blueprint node.

On-screen keyboard

UE can request text input from the user by sending a showOnScreenKeyboard command. The SDK handles this automatically:
1

UE sends showOnScreenKeyboard

UE sends showOnScreenKeyboard with the current text content and cursor position.
2

SDK displays input modal

The SDK displays a floating text input modal (EditTextModal).
3

User confirms input

The user types and confirms the entry.
4

SDK returns text to UE

The SDK sends the text back to UE via the TextboxEntry handler.
The on-screen keyboard flow is fully automatic. No additional code is needed on the web side — the SDK handles displaying the input modal and sending the text back to UE.

Bidirectional communication example

// Web → UE: Request current score
appStream.stream.emitUIInteraction({
  type: 'request',
  action: 'getScore'
});

// UE → Web: Receive the score
pixelStreaming.addResponseEventListener('handle_responses', (response) => {
  const data = JSON.parse(response);
  if (data.type === 'scoreUpdate') {
    document.getElementById('score').textContent = data.score;
  }
});

Next steps

pixelStreaming API

Full reference for emitConsoleCommand, addResponseEventListener, and other methods.

Voice and text chat

Add real-time voice and text chat between users.