how to play just a video in a scene without any target or anything.

I want to play a video in a scene as soon as it is loaded without any targets or anything.I’ll just load the the scene, the video will be played and after playing it will return back to the previous scene.I tried making it from the vuforia playback but was unsuccessfull. Please help.

1 Answer

1

You need pro and MovieTexture to play movie in Unity.

Then it just goes:

public MovieTexture mvText;
   void Start()
   {
      mvText.Play();
      mvText.loop = false;
   }
   void Update()
   {
      if(mvText.isPlaying)return;
      Application.LoadLevel("Level");
   }

Edit: if you are on mobile use Unity - Scripting API: Handheld.PlayFullScreenMovie

Yeah thanks for replying. But I want it in my android phone. And I think movie texture is not supported in android\IOS. What I really want is to stream a video from a web server in my android phone. Thats it. Thanks again for replying

Check the edit

Thanks for replying fafase. This is what I've tried 1) I imported only the video prefab and I changed the path to a video on a reliable web server. It didn't work. 2)I also tried you suggestion but again it didn't work.I created an empty gameobject and attached the script.