How to open a video inside the unity scene?

Hi,

first things first, I code in Js. I’m working on a program, but I’m stuck vith this problem. I have a button a simple GUI button, when the player click on the button it should appear a video, without leaving the unity scene, the video can be online or off.

I used Application.OpenURL(“RISE - Dark Knight Rises Song By Miracle Of Sound - YouTube”); (it’s a test music video not rickroll xD) it works but the video is loading in a brower and not in the scene.

Someone can help me?

Hi Diego,

Firstly, Application.OpenURL is used for opening web pages in the user’s default browser (For example: You may want to link the user to the game’s dev blog, your twitter account, etc), not for displaying video.

There are a couple of ways to display video inside Unity:

  • If you have a Pro License, you could save your video file into your Assets folder and render it as a Movie Texture. That way, you could apply it to a cube or a plane (or any 3D model for that matter) and it would display just how a normal image texture would, but animated. You will have to write some script to play/pause it.
  • You could also display it in a GUI. A similar question was asked that has a number of useful solutions in the answers. You probably need Pro for this aswell.

Hope this helps!