docs.unity3d.com
    Show / Hide Table of Contents

    Gyroscope Sample

    This sample shows ways to operate the direction of a camera on the remote PC from the mobile device that equipped gyro sensor.

    Note

    In this version, it was checked on only iOS devices. Android and other devices are not supported by this sample.

    Note

    If no codec is available on both sender and receiver, the video can not stream. Please note that the compatibility of codecs is different corresponding to platforms and graphics API.

    Usage

    Hardware acceleration

    Recommend enabling Hardware Encoder support on the Render Streaming inspector to improve performance using hardware acceleration.

    Procedure

    1) Launch the signaling server using public mode. Please refer to this link for launching.

    Launch web server

    2) Open Gyro scene and specify IP address of the signaling server to the Signaling URL parameter on the inspector.

    Signaling url on inspector

    3) Specify the build platform (Currently iOS supported only) and start building. Connect the device to the PC, and transfer the application to the device.

    Build settings

    4) Open Broadcast scene and Specify IP address of the signaling server to the Signaling URL parameter on the inspector.

    Open Broadcast scene

    5) Click on the Play button in Unity Editor.

    6) Push the Play button on the device and check streaming video.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023