Search Results for

    Show / Hide Table of Contents

    Quick Start

    Playing Media

    A MediaPlayer component is always required and so should be the first component you add to your scene.

    1. Create a GameObject with the MediaPlayer component by selecting from the menu GameObject > Video > AVPro Video - MediaPlayer.

      alt_text

    2. On the MediaPlayer component, set the media source via the Settings > Source section. Press on the folder button to browse for the media you want to play. See the Loading Media section for more information about this.

      alt_text

    The MediaPlayer is set up to load and play your video, however it will not display yet (see below).

    Displaying Video on the UI

    The DisplayUGUI component is used to render the video to the UI.

    1. Create your UI canvas by going to the menu GameObject > UI > Canvas.
    2. Make sure the new Canvas GameObject is selected and then select from the menu GameObject > UI > AVPro Video uGUI to add the DisplayUGUI component.
    3. Select the new GameObject and assign the MediaPlayer property to the MediaPlayer created above.
    4. Play the scene to see your media displayed

    Displaying Video on a Mesh

    The ApplyToMesh component is used to render the video to a mesh.

    1. Add a 3D mesh object to your scene (eg Quad) and move it so that it is visible by the main camera.
    2. Add the ApplyToMesh components to a GameObject and assign the Media property to the MediaPlayer created above and the Renderer property to the MeshRenderer component.
    3. Create a new material and assign it a suitable AVPro Video shader (eg AVProVideo/Unlit/Opaque).
    4. In the MeshRenderer assign this new material to the Materials Element 0 property.
    5. Play the scene to see your media displayed on a mesh.

    Demo Scenes

    Read about the included demo scenes as these are also a good quick start reference for typical use-cases.

    In This Article