- Home /
GUITexture MovieTexture Play
Hi there,
I have a GUITexture in a scene with an MP4 dragged into the Texture field. I've attacked a script that has the following attached to the GUITexture in the Start method:
guiTexture.texture.Play();
Assets/Video.cs(16,41): error CS1061: Type
UnityEngine.Texture' does not contain a definition for
Play' and no extension methodPlay' of type
UnityEngine.Texture' could be found (are you missing a using directive or an assembly reference?)
It seems to be casting the movie as a Texture instead of a MovieTexture. Older reference suggests this is the correct syntax. (http://answers.unity3d.com/questions/28555/video-on-a-guitexture.html)
What am I missing?
Answer by Dee Va · Jun 25, 2014 at 04:34 PM
Well, you are using the JS Script Code in C#.
Try create new JS script and past your code and it will work :)
-Dee