Shouldn't unity automatically know that the maintexture is a movietexture and allow access to Play()? It just seems a little clunky, but I'm by no means an expert programmer.
Currently I have to use the following code and cast the texture as a MovieTexture before I can play it:
MovieTexture movieTexture;
// Use this for initialization
void Start () {
movieTexture = renderer.material.mainTexture as MovieTexture;
movieTexture.Play ();
}
Thank you for any explanations!
↧