Hi, i’m working for mobile games and i have currently 3 guitexture gameobject that use for virtual joystick, how can i scale these guitexture? since i did not drawing this texture using script so it’s not draw by calling function OnGUI() so i can’t use this code for scaling
function OnGUI()
{
var svMat = GUI.matrix;
scale.x = Screen.width/originalWidth;
scale.y = Screen.height/originalHeight;
scale.z = 1;
GUI.matrix = Matrix4x4.TRS(Vector3.zero, Quaternion.identity, scale);
drawPause();
GUI.matrix = svMat;