Samples

July 25, 2023 ยท View on GitHub

The package contains the following samples.

SceneDetails
ReceiverDisplaying a video streaming from another Unity
BroadcastStreaming video and audio to multi Unity applications
Bidirectionalbi-directional(send/receive) each other's video
MultiplayMulti player game using video streaming
RenderPipelineStreaming video using HDRP or URP
AR FoundationControling a camera using AR Foundation
GyroscopeControling a camera using Gyroscope
Web Browser InputStreaming the video from Unity to the web browser

Import samples in project

You can import samples from the bottom of the com.unity.renderstreaming package in the Package Manager Window.

Sample List

Build Settings

It is easy to try all samples if only you put sample scenes into Scenes in Build in Build Settings Window. Menu scene should be loaded as a first one so you need to rearrange scenes.

Build Settings

Sample menu

Menu scene is helpful for checking multiple sample scenes. You can find the scene Example/Menu/Menu.scene.

Sample menu

Open Menu scene and press Play button, as you can see the menu for sample scenes.

Sample menu

You can change signaling settings below during runtime.

ParameterDescription
Use Default SettingsRefer to settings of Project Settings.
Signaling TypeHttp or WebSocket.
Enable/Disable SSLUse https if set enable.
Host AddressSet IP address or URL of your signaling server.
Interval (msec)Polling interval for communication of signaling.
This parameter effects Http signaling.

Sample menu

Moreover, you can choice the options about the video streaming settings.

ParameterDescription
Video Codec (Receiver)Choice preferred video codec for receiver.
Often the performance of Hardware codec is greater than software codec.
Video Codec (Sender)Choice preferred video codec for sender.
Stream SizeSet the resolution of video streaming for sender.