- Home /
How to load a movie at the beginning of my game
I'M A BEGINNER and I just want do know how to play a movie at the beginning of my game plz answer
Do you have to have Unity Pro? You can't without it. You will have to make your own in game cutscenes.
@Peter G: You can play $$anonymous$$ovie Textures without Unity Pro... I'm not sure what you're referring to...
@SpikeX: This page: http://unity3d.com/unity/licenses.html says video is Pro-only.
@Eric: That's all fine and dandy, but THIS page says nothing about $$anonymous$$ovie Textures being Pro-only: http://unity3d.com/support/documentation/$$anonymous$$anual/Video%20Files.html -- So, which one is wrong?
Yes i have unity 3d Pro but i just cant understand this page :( http://unity3d.com/support/documentation/$$anonymous$$anual/Video%20Files.html
Answer by qJake · Jun 07, 2010 at 10:01 PM
You can use a Movie Texture.
Edit: Alright, this is as detailed as I'm going to get. If you still don't understand me, I don't know what else to tell you, other than to learn some Unity basics before attempting this.
- Import your movie file into the Assets section of Unity.
- Create an empty Game Object.
- Place something like this script inside of it:
MovieTexture myMovie;
void Start() { myMovie.Play(); }
void OnGUI() { GUI.DrawTexture(new Rect(0, 0, Screen.width, Screen.height), myMovie); }
I think that code will work, though I don't have Unity Pro so there's no way for me to test it out. Someone correct me if I'm wrong.
Anyway.
- Attach that script (add your own class header to it) to your empty Game Object.
- Drag your movie file from the Assets pane onto the Inspector for the script (on the empty game object), which should have a slot for "My Movie".
- Play the scene. Your movie should play, full-screen.
Edited, added detailed instructions. If you still don't understand how to do it, learn some Unity basics: http://answers.unity3d.com/questions/4897/how-can-i-start-learning-unity-fast
This answer should be rated up for pure tolerance and simplicity ;P
As stated at the top, you have to have Unity Pro for this, otherwise it wont work.
Answer by Seyed_Morteza_Kamaly · Nov 19, 2015 at 07:06 PM
using UnityEngine; using System.Collections;
public class NewBehaviourScript : MonoBehaviour { public MovieTexture myMovie;
void Start()
{
myMovie.Play();
}
void OnGUI()
{
GUI.DrawTexture(new Rect(0, 0, Screen.width, Screen.height), myMovie);
}
}
Your answer
Follow this Question
Related Questions
www.movie in unity free 1 Answer
GUI movie texture - sound delay 1 Answer
Unity Movie Texture Audio Black Screen 1 Answer
Best method to stream large still image stream as movie-like texture 1 Answer
Want to make film... how to do this? 1 Answer