未验证 提交 2acd6188 编写于 作者: K Kazuki Matsumoto 提交者: GitHub

doc: update doc (#226)

* update doc

* fixed build error

* Fixed doc

* Update "manifest.json" and "package.json"

* fixed template document

* fixed doc

* fixed readme

* fixed README

* Fixed document

* fixed doc

* fixed doc

* fixed doc
上级 51e3cb98
......@@ -43,7 +43,7 @@
"lock": {
"com.unity.webrtc": {
"revision": "release/1.1.0",
"hash": "a91572e917c91bfa817e2fc875c00a41316fdd12"
"hash": "b00cafe0bc6fd7170eab00689eaafae2d1698299"
}
}
}
......@@ -4,6 +4,17 @@ 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).
## [1.2.0] - 2020-02-14
- Added: Adding AudioStreamer class
- Added: Adding the flag to select encoder
- Changed: Upgrading Unity version to 2019.3
- Changed: Upgrading HDRP to 7.1.7
- Changed: Upgrading input system to 1.0.0-preview.1
- Changed: Upgrading WebRTC to 1.1.0-preview
- Fixed: Display the mouse pointer in the correct position
- Fixed: Try downloading webserver from a known version if the current version doesn't exist
## [1.1.2] - 2019-09-20
- Fixed: Fix image links for Japanese documentation on Unity website
......
* [Unity Render Streaming](index)
* Getting Started
* [Overview](en/overview)
* [Tutorial](en/tutorial)
* [Web Application](en/webapp)
* [Browser Input Process](en/input)
* [Configure Self-Signed Credentials for https](en/https)
* [Render Streaming Settings](en/class-renderstreaming)
* [FAQ](en/faq)
* 日本語
* [Unity Render Streaming](jp/index)
* 利用を開始する
* [概要](jp/overview)
* [チュートリアル](jp/tutorial)
* [Web アプリケーション](jp/webapp)
* [ブラウザー入力処理](jp/input)
* [HTTPSの証明書の設定](jp/https)
* [TURN サーバの設定](jp/turnserver)
* [Render Streaming 設定](jp/class-renderstreaming)
* [よくある質問](jp/faq)
\ No newline at end of file
......@@ -6,21 +6,22 @@
- Streaming input from cameras
- Associating browser input with events
<img src="../images/renderstreaming_inspector.png" width=500 align=center>
![Render Streaming Inspector](../images/renderstreaming_inspector.png)
## Properties
| Parameter | Description | Default |
| ---------------------------- | ------------------------------------------------------------ | ------------------------------- |
| **URL Signaling** | Set the signaling server URL | http://localhost |
| **Ice Servers** | Set a list of STUN/TURN servers | |
| *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 |
| **Interval** | Set the polling frequency (in seconds) to the signaling server | 5 |
| **Streaming Size** | The size of the frame buffer for the streaming | 1280, 720 |
| **Capture Camera** | Set the streaming camera | |
| **Array Button Click Event** | Register browser button click events | |
| *Element Id* | Set an ID that is sent from browsers | |
| *Click* | Set button click event | |
\ No newline at end of file
| Parameter | Description | Default |
| ---------------------------- | -------------------------------------------------------------------------------------------------------------------------- | ------------------------------- |
| **URL Signaling** | Set the signaling server URL | http://localhost |
| **Ice Servers** | Set a list of STUN/TURN servers | |
| *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 |
| **Interval** | Set the polling frequency (in seconds) to the signaling server | 5 |
| **Streaming Size** | The size of the frame buffer for the streaming | 1280, 720 |
| **Capture Camera** | Set the streaming camera | |
| **Hardware Encoder Support** | Enable the checkbox to make this video encoding replace values that use a [hardware encoder](../index.md#hardware-encoder) | Enabled |
| **Array Button Click Event** | Register browser button click events | |
| *Element Id* | Set an ID that is sent from browsers | |
| *Click* | Set button click event | |
\ No newline at end of file
......@@ -6,16 +6,15 @@
The browser version might be too old. Make sure that the latest version is installed.
### Web app doesn't run on iOS Safari
### Web app doesn't run on Safari browser
Check the web server's [startup options](webserver.md). In **Safari** and **iOS Safari**, WebRTC features cannot be used with **http**. Instead, **https** must be used.
### Unity's initial startup fails
Confirm you're using a `Graphics API` and compare [requirements](https://docs.unity3d.com/Packages/com.unity.webrtc@latest/en/overview.html) of `com.unity.webrtc`.
Make sure you're using a graphics card that supports **Nvcodec**. Also confirm that the latest graphics driver version is installed. See also: `com.unity.webrtc` documentation.
And currently, this package supports only `Direct3D11`. If you select other API, the initialization process will fail.
### Web server fails to run
Make sure the port isn't being used by another service.
......@@ -24,11 +23,11 @@ Make sure the port isn't being used by another service.
### Which versions of Unity can be used?
Unity 2019.1 and later.
It is available on Unity 2019.3.
### Which OS can be used?
Windows10 x64. Support for other OS' will be provided later.
Windows10 x64, Linux x64, MacOS. Support for UWP(Universal Windows Platform), mobile platform like Android and iOS will be provided later.
### Are there any hardware constraints?
......@@ -58,4 +57,14 @@ Video quality depends on the quality of the network.
### Is Realtime-Raytracing supported?
Currently, version 1.0 cannot.
Currently, version 1.2 cannot.
## Questions about support
### Technical support from Unity can be gotten?
It is available to ask questions on the page of [Unity forum](https://forum.unity.com/forums/unity-render-streaming.413). Also please report on [Github Issues](https://github.com/Unity-Technologies/UnityRenderStreaming/issues) for reporting bugs or requesting features.
### Is it available to deploy Unity to cloud service like GCP as a rendering server?
Unity is not supported using for rendering server.
\ No newline at end of file
# **Configure Self-Signed Credentials for https**
# Configure Self-Signed Credentials for https
## **Contents**
## Prerequisites
* [Prerequisites](#Prerequisites)
* [Windows](#Windows)
* [1. Chocolatey](#1.-Chocolatey)
* [2. OpenSSL](#2.-OpenSSL)
* [Step 1: Create a Private Key](#Step-1:-Create-a-Private-Key)
* [Step 2: Create a Certificate File](#Step-2:-Create-a-Certificate-File)
* [Step 3: Get Windows to Trust the Certificate Authority (CA)](#Step-3:-Get-Windows-to-Trust-the-Certificate-Authority-(CA))
* [Step 4: Create a Local Domain Site](#Step-4:-Create-a-Local-Domain-Site)
* [Step 5: Create a Private Key (client-1.local.key) and Certificate Request (client-1.local.csr) for the New Domain](#Step-5:-Create-a-Private-Key-(client-1.local.key)-and-Certificate-Request-(client-1.local.csr)-for-the-New-Domain)
* [Step 6: Issue the New Certificate (client-1.local.crt)](#Step-6:-Issue-the-New-Certificate-(client-1.local.crt))
* [Step 7: Run the webserver.exe](#Step-7:-Run-the-webserver.exe)
### Windows
## **Prerequisites**
### Chocolatey
### **Windows**
Chocolatey is a package manager for Windows (like apt-get or yum but for Windows).
Link to install Chocolatey: [https://chocolatey.org/install](https://chocolatey.org/install)
#### ***1. Chocolatey***
### OpenSSL
* Chocolatey is a package manager for Windows (like apt-get or yum but for Windows).
* Link to install Chocolatey: [https://chocolatey.org/install](https://chocolatey.org/install)
OpenSSL is a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols.
Installation:
#### ***2. OpenSSL***
```terminal
choco install openssl.light
```
* OpenSSL is a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols.
* Installation:
## Step 1: Create a Private Key
```terminal
choco install openssl.light
```
Run the command:
## **Step 1: Create a Private Key**
```terminal
"C:\Program Files\OpenSSL\bin\openssl.exe" genrsa -des3 -out rootSSL.key 2048
```
* Run the command:
Enter a Password:
```terminal
"C:\Program Files\OpenSSL\bin\openssl.exe" genrsa -des3 -out rootSSL.key 2048
```
```terminal
Enter pass phrase for rootSSL.key:
```
* Enter a Password:
Verify the Password:
```terminal
Enter pass phrase for rootSSL.key:
```
```terminal
Verifying - Enter pass phrase for rootSSL.key:
```
* Verify the Password:
## Step 2: Create a Certificate File
```terminal
Verifying - Enter pass phrase for rootSSL.key:
```
Run the command:
## **Step 2: Create a Certificate File**
```terminal
"C:\Program Files\OpenSSL\bin\openssl.exe" req -x509 -new -nodes -key rootSSL.key -sha256 -days 1024 -out rootSSL.pem
```
* Run the command:
Enter the Password:
```terminal
"C:\Program Files\OpenSSL\bin\openssl.exe" req -x509 -new -nodes -key rootSSL.key -sha256 -days 1024 -out rootSSL.pem
```
```terminal
Enter pass phrase for rootSSL.key:
```
* Enter the Password:
Enter your Country's 2-Letter Code:
```terminal
Enter pass phrase for rootSSL.key:
```
```terminal
Country Name (2 letter code) [AU]:CA
```
* Enter your Country's 2-Letter Code:
Enter the name of your state/province:
```terminal
Country Name (2 letter code) [AU]:CA
```
```terminal
State or Province Name (full name) [Some-State]:Quebec
```
* Enter the name of your state/province:
Enter the name of your locality (city):
```terminal
State or Province Name (full name) [Some-State]:Quebec
```
```terminal
Locality Name (eg, city) []:montreal
```
* Enter the name of your locality (city):
Enter the name of your organization:
```terminal
Locality Name (eg, city) []:montreal
```
```terminal
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Unity
```
* Enter the name of your organization:
Enter the name of your business unit within the organization:
```terminal
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Unity
```
```terminal
Organizational Unit Name (eg, section) []:Verticals
```
* Enter the name of your business unit within the organization:
Enter your computer's `fully qualified domain name` or your name:
```terminal
Organizational Unit Name (eg, section) []:Verticals
```
* Enter your computer's `fully qualified domain name` or your name:
```terminal
Common Name (e.g. server FQDN or YOUR name) []:Tony
```
```terminal
Common Name (e.g. server FQDN or YOUR name) []:Tony
```
Enter your e-mail address:
* Enter your e-mail address:
```terminal
Email Address []:anthonyma@unity3d.com
```
```terminal
Email Address []:anthonyma@unity3d.com
```
## **Step 3: Get Windows to Trust the Certificate Authority (CA)**
## Step 3: Get Windows to Trust the Certificate Authority (CA)
1. Search for and run `Microsoft Management Console (mmc.exe)`
......@@ -158,7 +144,7 @@
![Add/Remove Snap-in...](../images/https_step3_12.png)
## **Step 4: Create a Local Domain Site**
## Step 4: Create a Local Domain Site
1. Add `127.0.0.1 client-1.local` to your `C:\Windows\System32\drivers\etc\hosts` file.
......@@ -190,9 +176,9 @@
```
## **Step 5: Create a Private Key (client-1.local.key) and Certificate Request (client-1.local.csr) for the New Domain**
## Step 5: Create a Private Key (`client-1.local.key`) and Certificate Request (`client-1.local.csr`) for the New Domain
* Execute this command ensuring the following fields are the same as the ones you used in [Step 1: Create a Private Key](#Step-1:-Create-a-Private-Key):
Execute this command ensuring the following fields are the same as the ones you used in **Step 1: Create a Private Key**:
* C=CA (Country)
* ST=Quebec (State)
* L=montreal (Locale)
......@@ -201,28 +187,28 @@
* CN=Tony (Name)
* email<span>Address=anthonyma@unity3d.</span>com (E-Mail)
```terminal
"C:\Program Files\OpenSSL\bin\openssl.exe" req -new -sha256 -nodes -out client-1.local.csr -newkey rsa:2048 -keyout client-1.local.key -subj "/C=CA/ST=Quebec/L=montreal/O=Unity/OU=Verticals/CN=Tony/emailAddress=anthonyma@unity3d.com"
```
```terminal
"C:\Program Files\OpenSSL\bin\openssl.exe" req -new -sha256 -nodes -out client-1.local.csr -newkey rsa:2048 -keyout client-1.local.key -subj "/C=CA/ST=Quebec/L=montreal/O=Unity/OU=Verticals/CN=Tony/emailAddress=anthonyma@unity3d.com"
```
## **Step 6: Issue the New Certificate (client-1.local.crt)**
## Step 6: Issue the New Certificate (`client-1.local.crt`)
* Execute the command:
Execute the command:
```terminal
"C:\Program Files\OpenSSL\bin\openssl.exe" x509 -req -in client-1.local.csr -CA rootSSL.pem -CAkey rootSSL.key -CAcreateserial -out client-1.local.crt -days 500 -sha256 -extensions "authorityKeyIdentifier=keyid,issuer\n basicConstraints=CA:FALSE\n keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment\n subjectAltName=DNS:client-1.local"
```
```terminal
"C:\Program Files\OpenSSL\bin\openssl.exe" x509 -req -in client-1.local.csr -CA rootSSL.pem -CAkey rootSSL.key -CAcreateserial -out client-1.local.crt -days 500 -sha256 -extensions "authorityKeyIdentifier=keyid,issuer\n basicConstraints=CA:FALSE\n keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment\n subjectAltName=DNS:client-1.local"
```
* Enter the password:
Enter the password:
```terminal
Enter pass phrase for rootSSL.key:
```
```terminal
Enter pass phrase for rootSSL.key:
```
## **Step 7: Run the webserver.exe**
## Step 7: Run the `webserver.exe`
* Execute the command:
Execute the command:
```terminal
.\webserver.exe -s -p 443 -k client-1.local.key -c client-1.local.crt
```
```terminal
.\webserver.exe -s -p 443 -k client-1.local.key -c client-1.local.crt
```
\ No newline at end of file
# Render Streaming Overview
# Overview
The following is an explanation the general concepts of the Render Streaming system.
......@@ -6,15 +6,16 @@ The following is an explanation the general concepts of the Render Streaming sys
The Render Streaming system consists of the following 3 components
- Unity (Editor or Application)
- Web server
- Web browser
- **Unity** (Editor or Application)
- **Web server**
- **Web browser**
![Render Streaming Overview](../images/renderstreaming_overview.png)
<img src="../images/renderstreaming_overview.png" width=500 align=center>
In Render Streaming a P2P network is created between **Unity** and the **Web browser**, and this network sends data via UDP/IP. The **Web server** enables communication between the Web browser and Unity. This communication is called signaling.
> [!NOTE]
> [!WARNING]
> Currently does not support the following features.
>
> - Streaming video from the browser to Unity
......@@ -24,7 +25,7 @@ In Render Streaming a P2P network is created between **Unity** and the **Web bro
The following is an explanation of how signaling works.
<img src="../images/renderstreaming_sequence.png" width=600 align=center>
![Render Streaming Sequence](../images/renderstreaming_sequence.png)
1. Web browser sends **Offer SDP** to the Web server.
2. Unity checks the Web server for unprocessed **Offer SDPs** and receives any found.
......@@ -43,13 +44,13 @@ The Render Steraming package includes the following.
- Sample code / assets
- Web application
<img src="../images/package_renderstreaming.png" width=300 align=center>
![Package Render Streaming](../images/package_renderstreaming.png)
### WebRTC Package
This provides the WebRTC C# API. See the WebRTC package documentation for details on the API.
This provides the WebRTC C# API. See the [WebRTC package documentation](https://docs.unity3d.com/Packages/com.unity.webrtc@latest/manual/en/index.html) for details on the API.
<img src="../images/webrtc_package_manager.png" width=500 align=center>
![WebRTC package manager](../images/webrtc_package_manager.png)
### Sample Code / Assets
......
# Tutorial
Currently, there are two samples:
### HDRP sample
Importing this sample will automatically install and setup our HDRP sample assets along with the [HDRP](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest) *(com.unity.render-pipelines.high-definition)* package.
### URP sample
Importing this sample will automatically install and setup our URP sample assets along with the [URP](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@latest) *(com.unity.render-pipelines.universal)* package.
## Simple Tutorial on Windows
Open an existing or create a new project
Click on the `Window` Menu and open `Package Manager`. Then, click on `Advanced` and make sure `Show preview packages` is checked
![Show Preview Packages](../images/show_preview_packages.png)
Make sure to search `All packages`, and type `RenderStreaming` in the text box.
![Render Streaming Package](../images/render_streaming_package.png)
Click `Install` on the bottom right.
If an input system dialog box appears, click `Yes`
![Input system backend](../images/input_system_backend.png)
Click on `Import in project` to import the HDRP sample.
This will also automatically install the HDRP package *(com.unity.render-pipelines.high-definition)*.
![HDRP sample](../images/hdrp_sample.png)
When this `Import Unity Package` dialog box appears, click `Import` to import all assets.
![HDRP Unitypackage](../images/hdrp_unitypackage.png)
After all the import process has been finished, open `Assets/SimpleScene` in the Project View.
![Simple Scene](../images/simplescene.png)
Click on `Edit/Render Streaming/Download web app` menu item to download [our web server](https://github.com/Unity-Technologies/UnityRenderStreaming/releases).
![Download webapp](../images/simplescene.png)
When the select download folder window appears, click on `Select Folder` to download the file to the default folder
![Select Download folder](../images/select_download_folder.png)
After the download is finished and a new explorer window is opened, click on `webserver.exe` to start
Unity RenderStreaming web server.
![Web Server](../images/webserver.png)
Enter play mode in Unity
![Play mode](../images/play_mode.png)
Open your browser and type `localhost` on the URL bar. Then click on the play button in the middle.
The view in Unity should then appear on your browser.
![Browser](../images/browser.png)
\ No newline at end of file
......@@ -11,11 +11,12 @@ The **Render Streaming** web application uses WebRTC technologies, which means t
The following browsers are compatible:
- Chrome
- Safari
- Firefox
- iOS Safari
- Chrome for Android
| Browser | Windows | Mac | iOS | Android |
| --------------------------------- | ------------------ | ------------------ | ------------------ | ------------------ |
| Google Chrome | :white_check_mark: | :white_check_mark: | | :white_check_mark: |
| Safari | | :white_check_mark: | :white_check_mark: | |
| Firefox | :white_check_mark: | | | |
| Microfoft edge (Chrominium based) | :white_check_mark: | | | |
> [!NOTE]
> In **Safari** and **iOS Safari**, WebRTC features cannot be used with **http**. Instead, **https** must be used.
......@@ -25,17 +26,17 @@ The following browsers are compatible:
Click on `Edit/Render Streaming/Download web app` menu item to download [our web server](https://github.com/Unity-Technologies/UnityRenderStreaming/releases).
After downloading, run it from the command line.
<img src="../images/launch_webserver_explorer.png" width=500 align=center>
![Launch webserver explorer](../images/launch_webserver_explorer.png)
### Command Options
|Option|Details|Default|
|-------|-----|-------|
|-h --help|Show the help menu||
|-p —port \<number\>|Set the port number|80|
|-s --secure|Use https||
|-k —keyfile \<path\>|Designate the private key file to use with https|server.key|
|-c —certfile \<path\>|Designate the certification file to use with https|server.cert|
| Option | Details | Default |
| --------------------- | -------------------------------------------------- | ----------- |
| -h --help | Show the help menu | |
| -p —port \<number\> | Set the port number | 80 |
| -s --secure | Use https | |
| -k —keyfile \<path\> | Designate the private key file to use with https | server.key |
| -c —certfile \<path\> | Designate the certification file to use with https | server.cert |
### Command Examples
......@@ -50,9 +51,8 @@ This command will run the server as https. Port 443 will be used. A certificate
```shell
.\webserver -s -p 443
```
> When running a https server, keep in mind to set the `URL signaling` property of the Renderstreaming
> component in Unity to https as well.
When running a https server, keep in mind to set the `URL signaling` property of the Renderstreaming component in Unity to https as well.
Use this command to display the help guide.
```shell
......