I’m having problem resizing the Textures. And I need the textures to be in exact position no matter the Screen Aspect Ratio, Resolution. Here’s a layout of what I need. How to do it through coding and I’ve attached my current code.
Code :
var playImage : Texture;
var optionImage : Texture;
var exitImage : Texture;
var myStyle : GUIStyle;
function OnGUI ()
{
if(GUI.Button(Rect(Screen.width/2, Screen.height/2, 190, 40), playImage))
{
Debug.Log("works!");
}
if(GUI.Button(Rect(Screen.width/2, Screen.height/2, 190, 40), optionImage))
{
Debug.Log("works!");
}
if(GUI.Button(Rect(Screen.width/2, Screen.height/2, 190, 40), exitImage))
{
Debug.Log("works!");
}
}