Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Unity: Movie Texture

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 5.24k
    Comment on it

    Hello, Readers !!

    Today we are going to discuss the video part in the Unity Games.

    What if you want to play and video in the Unity Game. How will you do this? For this only I am going to explain you about the Movie Textures.

     

    Movie Texture is the best way to show the videos in the game. Because Unity didn't support local media player. So you need to convert it as texture to play. You can use them to render movies into the scene itself.

    Movie Texture takes number of variables:-

    • audioClip:-  You can get the audio clip belongs to the video clip. So that you can call your other functions.
    • duration:- Durations returns you the time in which video will be finished.
    • isPlaying:-   You can check whether the current video is playing for not.
    • isReadyToPlay:-  If you are downloading some video from server or your video is very heavy then you can check its ready condition. Once video is ready to play then you can call play function to start the video.
    • loop:-  You can also set your video on the loop. In this video will restart again and again. You no need to restart it manually.

    Movie texture also provides some other important functions.

    Public Functions:-

    • Pause:- You can set Pause to playing video.
    • Play:- You can start any video at any time.
    • Stop:- when you want to stop the video then you can use this function.

    Try this and play videos in your game.

    Till then keep coding...

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: