[Tutorial] Unity mod menu automatic scale according to Screen


METAL SLUG ATTACK Hack 3.17.0 (MOD,Unlimited AP) Apk
void OnGUI()    
    {
        //get scale value
        Vector3 scale = new Vector3 (Screen.width / nativeSize.x, Screen.height / nativeSize.y, 1.0f);
       
        //and apply the scale to all gui scripted here
        GUI.matrix = Matrix4x4.TRS (new Vector3(0, 0, 0), Quaternion.identity, scale);
        // write your own code
        if (GUI.Button(new Rect(20, 20, 160, 20), "Scaled"))
        {
            //your code
        }
    }

Leave a Reply

Your email address will not be published.