0

I am working on a Unity Project, and I am trying to Load and Run Videos at runtime.

All the video links are coming from the API at runtime. Unity doesn't have a ListView or a Collection View like (Android or iOS) to render Video with controls (play-pause-stop)?

How can we do that?

Thanks in advance

André Sousa
  • 1,692
  • 1
  • 12
  • 23
Qusai Azzam
  • 465
  • 4
  • 19

1 Answers1

1

Unity doesn't have a ListView or a Collection View Like (Android or iOS) to render Video with controls (play-pause-stop)?

Unity has ListView which is new and still in experiment mode in version 2018.2.

You don't even need that. You can use the ScrollView in addition with the Vertical Layout Group to accomplish what you need. It should look like this. A basic understanding of how to create UI objects is required. See this.

As for playing video, you need to use the RawImage component. They should be placed under the "Content" Object of the ScrollView. You only need one VideoPlayer component in the scene and can use code to tell it which RawImage to play video on and change the video url.

See this post for how to play video on a RawImage component.

Programmer
  • 121,791
  • 22
  • 236
  • 328