Struct VideoPlayer | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Struct VideoPlayer

    Add this component to an entity to create a video player.

    Namespace: Unity.Tiny.Video
    Syntax
    public struct VideoPlayer : IComponentData
    Remarks

    This component is required to play a video clip, and to set options such as whether or not to display the video player controls, whether to loop the video, etc.

    Fields

    clip

    The clip entity. Attach a VideoClip to it to play a video. The video is muted by default.

    Declaration
    [EntityWithComponents(new Type[]{typeof(VideoClip)})]
    public Entity clip
    Field Value
    Type Description
    Entity

    controls

    If true, video controls (Play/Pause/FullScreen/Volume) are displayed.

    Declaration
    public bool controls
    Field Value
    Type Description
    System.Boolean

    currentTime

    Current playback time, in seconds

    Declaration
    public double currentTime
    Field Value
    Type Description
    System.Double

    loop

    If true, the player automatically seeks back to the start of the video after reaching the end. This attribute is ignored if the entity has a VideoPlayerAutoDeleteOnEnd component.

    Declaration
    public bool loop
    Field Value
    Type Description
    System.Boolean

    Properties

    Default

    Declaration
    public static VideoPlayer Default { get; }
    Property Value
    Type Description
    VideoPlayer
    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