Skip to main content
Advanced For developers who build a page while the Unreal app is still changing. After this page you can stream from Unreal on your own machine into your page, without packaging or uploading a build. Test locally streams from Unreal on your own machine instead of an uploaded build. Nothing is uploaded and no Streampixel GPU is used: your machine renders, and Streampixel connects the browser to it. The SDK joins such a session with the dev option.
Test locally is in beta: the dashboard tab is labelled BETA. The dev option is part of @streampixel/web-sdk 2.0.0-beta.2.

When to use it

How it works

A dev session is a meeting point for one Unreal process and your browser. Streampixel connects the two: your page shows what Unreal renders on your machine. You do three things, in three places:
  1. Dashboard: start a session. It has an ID (dev- and six characters) and lasts 2 hours.
  2. Unreal: connect to the session with its signalling URL or its launch argument.
  3. Your page: pass the session ID to create().
Steps 2 and 3 can be done in either order: the page waits for Unreal.

Before you start

  • A Streampixel project and its project ID. The project needs no build, and it may be switched off.
  • Unreal Engine with the Pixel Streaming plugin enabled. It is already on if you have uploaded a build to Streampixel.
  • A network that lets your machine reach Streampixel’s dev streamer: outbound access to dev-streamer.streampixel.io on port 8888. See Test Locally in the dashboard guide.
  • A page with the SDK installed, served over https or from localhost.
  • A project whose access is public, password or single sign-on. A “Your app only” project (not available yet) cannot be opened with dev.

Set it up

1

Start a session in the dashboard

Open the project, then the Test Locally tab, and start a session. The session’s row shows:A session lasts 2 hours. The row shows the time left. After that, start a new session and use its ID: the old launch argument stops working.
The launch argument contains a token that identifies your session. Treat it like a password: do not commit it or paste it into a shared channel.
The dashboard side is described step by step in Test Locally.
2

Connect Unreal

There are three ways to connect Unreal to the session. Use one.
Paste the session’s Signalling server URL into the Signalling Server URL field of the Pixel Streaming toolbar menu. Then choose Stream Level Editor.This streams what the editor shows. It needs no launch argument and no restart.
The session’s row in the dashboard shows Connected when Unreal has reached Streampixel.
The launch argument comes in two forms, because Unreal renamed the plugin’s settings in 5.5. Choose the one that matches the plugin your project uses:With the wrong form the flags are ignored. See PS1 or PS2?.
3

Pass the session ID to create()

Add dev to the options, with the project’s appId as usual. Everything else in your page stays as it is.
main.ts
Your page shows what Unreal renders. If Unreal is not connected yet, the state stays connecting until it is.

Keep the session ID out of your code

A session, and with it its ID, lasts 2 hours, so do not write the ID into your code. A common pattern is to read it from the page address during development. The released page then has no dev option:
main.ts
string
The dev session ID from the dashboard: dev- and six characters. Requires appId.

What is different in a dev session

To tell the two waiting cases apart in your own screens:
The ready-made screens of @streampixel/ui do this for you: in a dev session the loading screen says “Waiting for your Unreal Editor…”. See Ready-made screens.
A dev session does not tell you how the uploaded build behaves. The app runs on your machine and your network, so start time, bitrate, resolution limits and behaviour on Streampixel’s GPU servers are not the same. Test the uploaded build before you release.

Errors

create() rejects before the stream starts: After the stream started, the session ends with the ended event: All other errors and end codes are the same as for a normal session: see Errors and disconnects.

Troubleshooting

Unreal has not connected to the session. The page waits without a time limit.Look at the session’s row in the dashboard. If it does not say Connected, one of these is the cause: the PS1 / PS2 form does not match the plugin, the Pixel Streaming plugin is disabled, port 8888 is blocked, or the session has expired.
The page uses the ID of another session than the one Unreal joined. Use the ID from the same row as the URL or launch argument you gave Unreal.
That is expected: the game renders off-screen. Open your page, or the preview link.
Play In Editor ignores the launch argument. Use Standalone Game.
The project’s access mode applies to dev sessions too. Enter the password or sign in, as a viewer would.
The app was not launched with -AllowPixelStreamingCommands. The launch argument carries it: paste the launch argument exactly as the dashboard shows it. This applies to stream.consoleCommand() and to stream.emitConsoleCommand(), which are the same call.
The session belongs to another project than appId. Start the session from the project whose ID you pass as appId.
The 2 hours are over. Start a new session. Unreal needs the new session’s URL or launch argument as well.
More than 10 minutes passed without Unreal. Start Unreal and call create() again.
The dev service is being updated. Try again in a few minutes.

Next steps

Talk to your Unreal app

Send and receive messages: the work a dev session is made for.

Test Locally in the dashboard

Start, revoke and read a dev session; the editor and Standalone Game steps in detail.

Reliability

One level up: the timings behind waiting, reconnecting and rejoining.

Options

Reference: everything create() accepts, dev included.