Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Video clip on ui

Discussion in 'UI Toolkit' started by useraccount1, Dec 8, 2022.

  1. useraccount1

    useraccount1

    Joined:
    Mar 31, 2018
    Posts:
    266
    Is it possible (and to what extent) to play something like a .mp4 video in the UI toolkit? I don't need an entire player for it, only to play a silent clip in an infinite loop.

    I'm asking because this is now a popular thing to do in tutorials.

    I'm (still) using 2021 LTS.
     
  2. ontrigger

    ontrigger

    Joined:
    Oct 31, 2016
    Posts:
    24
    You can use the built in video player to render your video to an rt. You can then set your rt as a background texture for any element like so: background-inage: resource(myvideort) OR url(/Assets/myvideort rendertexture)
     
    useraccount1 likes this.