Skip to main content

Setup Streaming Package

This is our core package, designed to have minimal impact on your project. It has very few special requirements and should quite happily sit alongside your current work.

Installing the Package

You can install the Streaming Package with one of the following methods

Streaming Package Download

Git URL Install

info

Note that this method requires you to have Git installed on your system

  • Open the Unity Package Manager (Window > Package Manager)
  • Click the plus in the top left and select Add package from git URL...
  • Copy and paste https://github.com/BeamXR-io/io.beamxr.unity.streaming into the URL box
  • Press Add and wait for Unity to import the package

Package From Disk Install

  • Download the Package from Github and extract it
  • Open the Unity Package Manager (Window > Package Manager)
  • Click the plus in the top left and select Add package from disk...
  • Locate the BeamXR Streaming package on your drive and click the package.json file
  • Press open and wait as Unity imports the package
tip

You can reference the package with a relative path by modifying the manifest.json file within your project's Packages folder.

Embedded Install

Download the Package from Github and simply extract the zip file into the Packages folder of your Unity project.

Unity will automatically find the package and install it as necessary.

Adding Scene Prefabs

When the package is installed, you will see a new BeamXR menu in your Unity window.

You can quickly add the required prefabs to your scene by navigating to BeamXR > Prefabs > Core > Add Streaming Prefab

This will add both the BeamXR Streaming Manager and BeamXR Streaming Camera to your scene. Both of these are the bare minimum required for using BeamXR.

Streaming Manager Setup

The Streaming Manager is the heart of the BeamXR system. It controls everything from starting streams, to reporting statuses, to account authentication.

You will need to add your Experience Key and Experience Secret, from the account setup process, to your manager before you can start streaming.

Streaming manager

The Streaming Manager is bundled alongside a BeamUnityEvents script, which should provide every type of event you should need within your game. It is highly recommended to subscribe to these events, instead of repeatedly polling the manager.

info

For a more detailed overview and explanation of the Streaming Manager, please refer to it's dedicated page. SDK Guides > Core > Streaming Manager

Audio

By default Beam will use the built in Unity Audio system. If you are using a third party solution such as Wwise or FMOD, please see our Third Party Audio instructions.

Streaming Camera Setup

The Streaming Camera controls the rendering and output of your project. It only renders when requested for performance reasons, and will render at the frame rate specified in the Streaming Manager.

info

For a more detailed overview and explanation of the Camera Settings, Camera Presets, and other camera features, please refer to the Streaming Camera and Camera Settings and Presets pages.

Your First Stream

Now that you've got everything else sorted, you're ready to hop into play mode and try streaming!

Navigate back to your BeamXR Streaming Manager. The first time you enter play mode, you will be asked to sign into your BeamXR account. To do this you can simply follow the instructions in the inspector to open your browser window. This is done per device/player and the details are stored between play modes.

Auth code

tip

Your device flow code will also be logged to the Unity console. You can use this to test in builds, without having to initially build or implement a login interface.

info

The same authorisation steps are required by your players. You can provide a quick access URL that works with the headset's built in web browser by accessing the BeamStreamingManager.Instance.DeviceFlowCode.VerificationUrlComplete

Once you are logged in, you can simply press the Start Streaming button to start your stream!

Start streaming

...and it's as simple as that! If you're looking for a more feature rich experience, continue on to the next page to learn about the Director Kit!