Leia Media
Leia Media refers to images and videos with defined rows and columns that, once interlaced, create 3D visuals.

Displaying Image or Playing Video using Leia Media‌


    Drag LeiaMedia > Prefabs > LeiaMediaViewer into a scene. Ensure the
    LeiaMediaViewer is visible to the LeiaCamera.
    Attach LeiaMedia content (texture or video) to one of the LeiaMediaViewer's properties or enter URL in Video URL field.

Notes on usage

    LeiaMedia must have a name that follows the format [name][cols]x[rows].[fmt]. Examples: image_2x2.png, video_2x2.mp4
    LeiaMedia renderers automatically change their aspect ratio to suit supplied image's aspect ratio
    Player Settings > Other Settings > Internet Access must be set to “Required” instead of “Auto” to play Video URLs
    URLs should use https://
    Linux is not supported for LeiaMedia
LeiaLoft > Modules > LeiaMedia > Example > Scenes > ExampleVideoUIScene.unity
There is a sample UI asset for controlling LeiaMedia which are playing back videos. See the "LeiaVideoSampleUI" object and LeiaMediaVideoSampleUI.cs files‌

Recording Leia Media

It is possible to record LeiaMedia using an editor-only tool within the Leia Unity SDK. Once LeiaMedia is generated, the LeiaMedia can be used as a resource in a built project and can be displayed to users like any other LeiaMedia.‌
    In Unity 2017.3+, this tool can record mp4s.
    In all Unity versions supported by the Leia Unity SDK, this tool can record jpgs and pngs.
An example of a scene that has been configured for recording is provided for users in the "ExampleRecordScene"
LeiaLoft > Modules > LeiaMedia > Example > Scenes > ExampleRecordScene.unity
See the MainCamera object in this scene with its attached LeiaCamera and LeiaMediaRecorder scripts.‌


    Create a scene with moving content and a LeiaCamera
    Attach the LeiaMediaRecorder.cs script to the gameObject with a LeiaCamera
    Set the trigger for recordings to start (a frame, user input, or a script). If trigger is a frame, specify frames to record between
    Set the recording format (jpg, png, in Unity 2017.3+ mp4)
    Enter play mode; if trigger to begin recording is a script or trigger, trigger the recording
    As the user finishes recording, content will be saved to the Assets/StreamingAssets folder
Last modified 2mo ago