I am following Vidoe Playback Sample in Unity3d, I just want to applied my texture instead of using default icon of Play Pause and error while video ready loading and when error occur. I successfully set my icons(in .jpg format), but it distrub the ratio(width/height) of images when rendering. So i want to apply "ScaleMode.ScaleToFit" property in icon textures so that it maintain the ration of images and not strech my images, but don't know how to do this.
"Texture2D tex = Resources.Load("ImageTargetTextures/WhatTheBuck/MyImage") as Texture2D;
video.m_playTexture = tex;
video.m_busyTexture = tex;
video.m_errorTexture = tex;
video.mIconPlane.renderer.material.mainTexture = tex;
Here is how i am rendering my images when specific marker detects it render successfully but strech my images. Kindly help me on that. Thanks in advance