docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Creating The Scene

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

    Changing Project Settings

    The procedure described in this page assumes that the Automatic Streaming feature is not used. Please turn the flag off following steps.

    1: Open the Project Settings window.

    2: Select Render Streaming tab.

    3: Select Create New Settings Asset.

    4: Save the asset with any name.

    5: Disable Automatic Streaming.

    Disable Automatic Streaming

    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

    Select the Main Camera object in the Hierarchy window, and add the Signaling Manager component in the Inspector window.

    Add SignalingManager component

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

    Add Broadcast component

    Assign the Broadcast component to the Handler property of the Render Streaming component.

    Assign Broadcast component to handler

    Add a Video Stream Sender component to the Main Camera object. This component refers to the Camera and delivers it as a stream to other peers.

    Add VideoStreamSender component

    Assign the Video Stream Sender component to the Broadcast component property. And set camera

    Assign VideoStreamSender component to streams

    Check on browser

    Open the Receiver Sample page, and you should see the video from the Unity camera appear in your browser.

    Receiver Sample on the browser

    Next Step

    You can distribute video from Unity to the browser. It's also possible to stream audio. There are several types of components that can be streamed. Check the component page for details.

    Next, please try to control the camera from the browser. Please go to the next page.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)