GUI Orientation for NxK ScreenSize

Hi,

How do I fix the size? My GUI Buttons are all rreally tiny.

private float horizRatio = Screen.width / 1024.0f;
private float vertRatio = Screen.height / 768.0f;

private void OnGUI() {
    GUI.matrix = Matrix4x4.TRS (Vector3(0, 0, 0), Quaternion.identity, 
    Vector3 (horizRatio, vertRatio, 1));

    if (GUI.Button(new Rect(800, 105, 200, 20), "Button")) {
        Debug.Log("Clicked");
    }
}

I am testing the above in OnGUI for the GUI.Button function. When I change from one asepct ratio to the next I do not notice any significant change. It seems that when I experiment around with Screen.width and Screen.height (divded by some arbitrary value and/or subtracted/added by more arbitrary values) to get the desired oreintation it will not be in the same place!

Using integer math won't get fractions as a result, even if you define the variable as a float. In your code, horizRatio and vertRatio are probably both 1, depending on the screen resolution.