Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
## [3.1.0-exp.6] - 2023-2-24

### Added

- Support Automatic Streaming.
- Support Render Streaming Wizard.
- Support Command line arguments.
- Add Render Streaming Settings in the Project Settings window.

### Changed

- Rename classes.
  - `RenderStreaming` > `SignalingManager`
- Websocket is in default for signaling protocol instead of HTTP polling.
- Changed a unit of the HTTP polling interval, second to millisecond.
  • Loading branch information
Unity Technologies committed Feb 24, 2023
1 parent 02f6e02 commit 6cc34c8
Show file tree
Hide file tree
Showing 165 changed files with 15,069 additions and 6,395 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,22 @@ All notable changes to com.unity.renderstreaming package will be documented in t
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [3.1.0-exp.6] - 2023-2-24

### Added

- Support Automatic Streaming.
- Support Render Streaming Wizard.
- Support Command line arguments.
- Add Render Streaming Settings in the Project Settings window.

### Changed

- Rename classes.
- `RenderStreaming` > `SignalingManager`
- Websocket is in default for signaling protocol instead of HTTP polling.
- Changed a unit of the HTTP polling interval, second to millisecond.

## [3.1.0-exp.5] - 2023-1-16

### Changed
Expand Down
7 changes: 4 additions & 3 deletions Documentation~/TableOfContents.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
* [About Unity Render Streaming](index.md)
* [Overview](overview.md)
* [Tutorial](tutorial.md)
* [Developing a streaming application](dev-streaming-app-intro.md)
* [Installing The Package](installation.md)
* [Launching The Web Application](launch-webapp.md)
* [Creating The Scene](create-scene.md)
* [Setting Up Device Input](control-camera.md)
* [Render Streaming Settings](settings.md)
* [Render Streaming Wizard](wizard.md)
* [Web Application](webapp.md)
* [Configure Self-Signed Credentials for https](https.md)
* [Setting for TURN Server](turnserver.md)
Expand All @@ -15,7 +16,7 @@
* [Video Streaming Component](video-streaming.md)
* [Audio Streaming Component](audio-streaming.md)
* [Data Streaming Component](data-streaming.md)
* [Using with Input System](use-inputsystem.md)
* [Command-line option](commandline-option.md)
* [Samples](samples.md)
* [Receiver](sample-receiver.md)
* [Broadcast](sample-broadcast.md)
Expand Down
73 changes: 73 additions & 0 deletions Documentation~/commandline-option.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Command line arguments

Unity Render Streaming supports configuration changes via command line arguments. you can change settings to match the deployment environments. Command line arguments work with Windows, macOS, and Linux runtime applications. Mobile platforms aren't supported.

> [!WARNING]
> **-batchmode** and **-nographics** options don't work with Unity Render Streaming.
Command line arguments are evaluated when initializing the [**SignalingManager**](streaming-management.md) component. When command line arguments are evaluated in the **SignalingManager** component, it overrides the settings specified in the [Settings Window](settings.md). If you wish to ignore the command line options, specify **Evaluate command line arguments** off in the SignalingManager inspector. If a command line arguments contain invalid values, the contents of the configuration window are evaluated, instead of the arguments of the command line.

Use a command line with the following arguments to start your standalone app.

| Argument | Description |
| --- | --- |
| `signalingType <value>` | Specify the signaling type. **websocket** or **http**. |
| `signalingUrl <value>` | Specify the URL of signaling server. |
| `iceServerUrl <value>` | Set the URL of STUN/TURN server. |
| `iceServerUsername <value>` | Specify the user name of the TURN server. |
| `iceServerCredential <value>` | Specify the password of the TURN server. |
| `iceServerCredentialType <value>` | Specify the credential type for the TURN server. **password** or **oauth**. |
| `pollingInterval <value>` | Specify the polling interval in milliseconds to the signaling server. This value is used when using **http** for the signaling type. |
| `importJson <path>` | Specify the path of the JSON file. |

## Import JSON

You can change the configuration via the JSON file when using **-importJson** option in command line. The JSON file must be written in the following format:

```javascript
{
"signalingType": "websocket",
"signalingUrl": "ws://192.168.11.11",
"iceServers": [{
"urls": [
"stun:stun.l.google.com:19302"
],
"username": "user",
"credential": "pass",
"credentialType": "password"
}],
"pollingInterval": "5000"
}
```

## Command line examples

Change the signaling type to **http**:

```
RenderStreaming.exe -signalingType http
```

Change the URL of the signaling server:

```
RenderStreaming.exe -signalingUrl http://192.168.10.1
```

Specify multiple URLs of STAN servers:

```
RenderStreaming.exe -iceServerUrl stun:stun.l.google.com:19302 -iceServerUrl stun:stun.l.google.com:19303
```

Specify the URL, username, and password of the TURN server:

```
RenderStreaming.exe -iceServerUrl turn:192.168.10.10:3478?transport=udp -iceServerUsername username -iceServerCredentialType password -iceServerCredential pass
```

Specify the path of the JSON file:

```
RenderStreaming.exe -importJson config.json
```
6 changes: 3 additions & 3 deletions Documentation~/control-camera.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ To control the camera on the remote PC, we need to link the input events on web

## Check settings of Input System

First, please check [the settings](use-inputsystem.md) for using Input System.
First, please check the [Wizard window](wizard.md) about the Input System settings.

## Adding components for input processing

Expand Down Expand Up @@ -84,8 +84,8 @@ Once you have copied the script and saved the file, assign `PlayerController.Loo

## Checking on browsers

The mouse operation in the browser should be reflected in the rotation of the camera. If the camera is not moved, please check [the settings](use-inputsystem.md).
The mouse operation in the browser should be reflected in the rotation of the camera. If the camera is not moved, please check the settings on the [Wizard](wizard.md) window.

## Next step

We were able to incorporate the input processing using the Input Actions feature. If you would like to learn more about the features of Unity Render Streaming, please see the [Sample page](samples.md). Also, check out [Customizing your web application](customize-webapp.md) for information on how to modify the web user interface.
We were able to incorporate the input processing using the Input Actions feature. If you would like to learn more about the features of Unity Render Streaming, please see the [Sample page](samples.md). Also, check out [Customizing your web application](customize-webapp.md) for information on how to modify the web user interface.
27 changes: 18 additions & 9 deletions Documentation~/create-scene.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,31 @@

This tutorial explains how to edit an empty scene in Unity Editor and display the image rendered from the camera to the browser.

## Setting component
## Changing Project Settings

If Unity version is 2020 or later, Create a new empty scene. Select **File > New Scene** from the menu to open the dialog and select **Basic (Built-in)**.
The procedure described in this page assumes that the [**Automatic Streaming**](settings.md##general-settings) feature is not used. Please turn the flag off following steps.

![Create new scene](images/create_new_scene.png)
1: Open the **Project Settings** window.

2: Select **Render Streaming** tab.

3: Select **Create New Settings Asset**.

4: Save the asset with any name.

Select the **Main Camera** object in the Hierarchy window, and add the **Render Streaming** component in the Inspector window.
5: Disable **Automatic Streaming**.

![Add RenderStreaming component](images/add_renderstreaming_component.png)
![Disable Automatic Streaming](images/disable_automaticstreaming.png)

Update properties in the inspector.
## Setting component

If Unity version is 2020 or later, Create a new empty scene. Select **File > New Scene** from the menu to open the dialog and select **Basic (Built-in)**.

![Create new scene](images/create_new_scene.png)

- **Signaling Type** : `WebSocketSignaling`
- **Signaling URL** : `ws://localhost`
Select the **Main Camera** object in the Hierarchy window, and add the **Signaling Manager** component in the Inspector window.

![Create scene 03](images/change_properties_websocket.png)
![Add SignalingManager component](images/add_signalingmanager_component.png)

Next, we will add the **Broadcast** component to the **Main Camera** object. this component deliver the stream to multiple peers.

Expand Down
2 changes: 1 addition & 1 deletion Documentation~/data-streaming.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Data streaming is using [`RTCDataChannel`](https://docs.unity3d.com/Packages/[email protected]/manual/datachannel.html) of the WebRTC package internally.

Using the data streaming feature, we provide a component to send messages of [Input System](https://docs.unity3d.com/Packages/com.unity.inputsystem@latest). For more details, please check the section on [Using with Input System](use-inputsystem.md).
Using the data streaming feature, Unity Render Streaming provides a component to send messages of [Input System](https://docs.unity3d.com/Packages/com.unity.inputsystem@latest).

## [`InputSender`](../api/Unity.RenderStreaming.InputSender.html) component reference

Expand Down
8 changes: 0 additions & 8 deletions Documentation~/dev-streaming-app-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@

This section will walk you through the steps to create a simple streaming application from an empty Unity project.

## Install The Package

Install the package to start working. Please refer to the [Installing the package](installation.md) page to get started.

## Start the web application

After installing the package, please refer to the [Launching the Web Application](launch-webapp.md) page.

## Creating The Scene

To open the Unity editor and create a scene for streaming, see [Creating The Scene](create-scene.md).
Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Documentation~/images/assign_broadcast_to_handler.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Documentation~/images/browser_index_page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Documentation~/images/browser_warning_cert.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Documentation~/images/connect_from_browser.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Documentation~/images/launch_webapp_terminal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Documentation~/images/launch_webserver_private_mode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Documentation~/images/launch_webserver_public_mode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Documentation~/images/playground_scene.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed Documentation~/images/renderstreaming_inspector.png
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Documentation~/images/renderstreaming_wizard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Documentation~/images/sample_menu_scene.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Documentation~/images/sample_menu_setting_panel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Documentation~/images/unityhub_createproject.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Documentation~/images/wizard_download_webapp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Documentation~/images/wizard_fixall.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions Documentation~/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,22 @@ This package provides the main features below.

We can broadcast video rendered on Unity to browsers via network. For example, It can show the video rendered with HDRP on the browser on the iPad. In addition, broadcasting from multiple cameras is supported.

![feature-multicamera](images/feature_multicamera.png)
![Render Streaming Wizard](images/feature_multicamera.png)

### Audio streaming
This package enables streaming sounds generated on Unity. And it can cast to multi-browsers simultaneously.

### Remote control

It is possible to send input messages to Unity from the browser, and sending inputs from multiple browsers is supported. Mouse, keyboard, touch, and gamepad are supported as input devices on the browser. For more information, please see the [Using with Input System](use-inputsystem.md) page.
It's possible to send input messages to Unity from the browser, and sending inputs from multiple browsers is supported. Mouse, keyboard, touch, and gamepad are supported as input devices on the browser.

## Requirements

This version of Render Streaming is compatible with the following versions of the Unity Editor

- **Unity 2020.3**
- **Unity 2021.3**
- **Unity 2022.1**
- **Unity 2022.2**

### Platform

Expand Down
27 changes: 0 additions & 27 deletions Documentation~/installation.md

This file was deleted.

52 changes: 0 additions & 52 deletions Documentation~/launch-webapp.md

This file was deleted.

11 changes: 6 additions & 5 deletions Documentation~/samples.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,19 @@ Open **Menu** scene and press `Play` button, as you can see the menu for sample
You can change signaling settings below during runtime.

| Parameter | Description |
| ----------- | --------------------------- |
| [**Signaling Type**](signaling-type.md) | *Http*, *WebSocket* or *Furioos* |
| **Enable/Disable SSL** | Use *https* if set enable. |
| --- | --- |
| **Use Default Settings** | Refer to settings of [Project Settings](settings.md). |
| [**Signaling Type**](signaling-type.md) | *Http*, *WebSocket* or *Furioos*. |
| **Enable/Disable SSL** | Use **https** if set enable. |
| **Host Address** | Set IP address or URL of your signaling server. |
| **Interval** | Polling interval for communication of signaling. <br/> This parameter effects Http signaling. |
| **Interval (msec)** | Polling interval for communication of signaling. <br/> This parameter effects Http signaling. |

![Sample menu](images/sample_menu_setting_panel.png)

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

| Parameter | Description |
|-----------|---------------------------|
| --- | ---|
| **Video Codec (Receiver)** | Choice preferred video codec for receiver. <br/> Often the performance of [Hardware codec](https://docs.unity3d.com/Packages/[email protected]/manual/videostreaming.html#hardware-acceleration-codecs) is greater than software codec. |
| **Video Codec (Sender)** | Choice preferred video codec for sender. |
| **Stream Size** | Set the resolution of video streaming for sender. |
30 changes: 30 additions & 0 deletions Documentation~/settings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Render Streaming Settings

Unity Render Streaming saves configuration assets to the project. The configuration asset are created in the Render Streaming panel of the Project Settings Window. If your project contains more than one configuration asset, select the asset in the Render Streaming Settings section.

![Render Streaming Project Settings](images/renderstreaming_settings.png)

## General Settings

| Parameter | Description | Default |
| ---- | ---- | ---- |
| **Automatic Streaming** | Automatically performs the necessary setup for streaming and starts streaming. | Enabled |

### Behaviour of the Automatic Streaming flag

If the **Automatic Streaming** flag is turned on, the application will automatically set up for streaming when it's started. This initialization process takes place before calling the **MonoBehaviour.Start** method on the scene. When streaming starts, the screen on the game view and the audio played by the **AudioListener** are delivered. It also receives mouse and keyboard input from the client and is configured to work with the Input System.

Streaming continues even when moving between scenes. If you want to stop streaming, turn the **Automatic Streaming** flag off.

## Signaling Settings

| Parameter | Description | Default |
| ---- | ---- | ---- |
| **Signaling Type** | Choose the signaling type (See [About Signaling Type](signaling-type.md)). | websocket |
| **Signaling Server URL** | Set the signaling server URL. <br>If you use WebSocket as a signaling protocol, you should specify a URL starting with **ws** or **wss**. | ws://127.0.0.1 |
| **ICE Server** | Set a list of STUN/TURN servers. (See [TURN Server](turnserver.md)) | |
| **URLs** | Set URLs of STUN/TURN servers. | [stun:stun.l.google.com:19302\] |
| **Username** | The username to use when logging into the TURN server. | |
| **Credencial** | The credential to use when logging into the TURN server. | |
| **Credencial Type** | This attribute specifies what kind of **credential** is to be used when connecting to the TURN server. | Password |
| **Polling Interval** | Set the polling frequency (in milliseconds) to the signaling server <br>Valid only if you are using Http as the signaling protocol. | 5000 (msec) |
10 changes: 5 additions & 5 deletions Documentation~/signaling-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ In the example, the schema given to `URL Signaling` is used to determine which t
If it starts with `http`, `Http Signaling` is used. If it starts with `ws`, `WebSocket Signaling` is used.

```
# launch server for HTTP
webserver.exe
# launch server for WebSocket
webserver.exe -w
webserver.exe
# launch server for HTTP
webserver.exe -t http
```

## `Http Signaling`
Expand All @@ -35,4 +35,4 @@ When the signaling server receives the Offer or Candidate, the server distribute
## `Furioos Signaling`

Please see [this page](deploy-to-furioos.md).
Please see [this page](deploy-to-furioos.md).
Loading

0 comments on commit 6cc34c8

Please sign in to comment.