- Home /
How to scale different GUI objects to fit screen size ANDROID
Hi, i was just wondering if there is an easy way to just auto scale all you GUI elements. for instance I know when your creating an Rect you can just use Screen.width/2 and so on, but when it comes to gui text objects, scaling font, and gui textures etc. is there a way that you can just scale everything out?
-thanks in advance for any help!
Answer by Lav-patel · Mar 01, 2013 at 07:01 AM
void OnGUI() { GUI.matrix = Matrix4x4.TRS(Vector3.zero, Quaternion.identity, new Vector3(1.0f Screen.width / 1024, 1.0f Screen.height / 768, 1));
//CODE of GUI.... set button,score,texture }
Your answer
Follow this Question
Related Questions
Button as a child of a button 0 Answers
Prime 31 In App Billing Android 1 Answer
Store/Stack Items 0 Answers
Multi Touch Disable on Virtual Joy-pad (FPS) 0 Answers
Android C# JoyStick Movement 0 Answers