Video on a GUITexture

Hi,

Should it be possible to apply video (a .mov file specifically) files to a GUITexture in place of a static texture?

I've tried but am getting puzzling results. I'm using a simple script I found in the Unity documentation to set the movie playing:

function Start () {
    renderer.material.mainTexture.Play();
}

Applying this to the GUITexture doesn't seem to do anything, however if I place a cube somewhere in the scene with the same video texture and script, the GUITexture works.

Any ideas as to why this is happening, or how I should be doing this properly?

Many thanks

Are you using Pro? Render to texture is a pro feature

1 Answer

1

A GUITexture is not a renderer.

So, instead of `render.material.mainTexture.Play()`, you should use `guiTexture.texture.Play()`.

for me it says "Play" is not a member of "UnityEngine.Texture" what should i do?