Hey, I wanted too add a video in the game (An 2D game). I created a texture (Mesh Filter and Mesh Randerer too) and dragged the video in. I also created an Audio Source for the sound. I positioned the video correctly, I can see it in the Scene. I Used this script :
var movTexture : MovieTexture;
function Start () {
renderer.material.mainTexture = movTexture;
movTexture.Play();
}
I got this error: UnassignedReferenceException: The variable movTexture of Video has not been assigned.
You probably need to assign the movTexture variable of the Video script in the inspector.
UnityEngine.MovieTexture.Play () (at C:/BuildAgent/work/d63dfc6385190b60/artifacts/EditorGenerated/MovieTextureBindings.cs:20)
Video.Start () (at Assets/Video.js:4)
If I add the audio it won’t start anyway i don’t know how. Thanks to help me.
EDIT: Ok I selected my video in the Mov Texture in the inspector of script (The little dot). Now I see my video but the video is a little bit darker and the error is still there.