docs.unity3d.com
    Show / Hide Table of Contents

    PolySpatial Video Component

    In order to support video content on visionOS, PolySpatial currently includes a custom PolySpatialVideoComponent. We expect to eventually support the stock video component, but this component provides key video functionality for visionOS in the interim. To use it, set the Target Material Renderer to the GameObject on whose MeshRenderer you want to display the video, and set Clip to point at the video asset you want to play, such as an .mp4

    A limitation of the current system is that the clip must be manually copied into a ../StreamingAssets/PolySpatialVideoClips/ folder for full functionality on visionOS. Create this folder if it does not exist. Ensure that the clip is not just moved into this folder, but copied into it, so that there are two instances of it.

    PolySpatialVideoComponent

    The PolySpatialVideoComponent component exposes the following properties:

    Property Description
    TargetMaterialRenderer Reference to the MeshRenderer on which the video should render. The video will overwrite the current material on that MeshRenderer.
    Clip The video asset to be played.
    IsLooping Whether the video should repeat when playback reaches the end of the clip.
    PlayOnAwake Whether the video should start playing when Awake() is called.
    Mute When true, audio playback is suppressed; when false, the volume value is respected.
    Volume The current volume of audio playback for the clip, ranging between 0 and 1.
    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