HI All,
I have a canvas, and in this canvas with frame and image inside.
I want to use the new Unity 5.6 Video to show a movie on the image.
Any ideas how?
HI All,
I have a canvas, and in this canvas with frame and image inside.
I want to use the new Unity 5.6 Video to show a movie on the image.
Any ideas how?
Put rawimage on canvas, then add this simple script:
public VideoPlayer player;
public RawImage image;
RenderTexture text;
void Start () {
text = new RenderTexture((int)player.clip.width, (int)player.clip.height, 0);
player.targetTexture = text;
image.texture = text;
Vector3 scale = image.transform.localScale;
scale.y = player.clip.height / (float)player.clip.width * scale.y;
image.transform.localScale = scale;
}