resolution independent GUI

any guidelines in creating resolution independent GUI? i will definitely have some parts that are fixed in width and height.
and we chose 1024x768 to be the lowest resolution to support. any more advices about this?

I have an idea witch will use for my game:
(optional) Add a scale variable to each and every part of your GUI - scale will be 1 at 1024x768 and and will increase/decrease with diff resolutions.
Instead of using static position - use a dynamic one.
button.screenPosition(100,200) should look like :
button.screenPosition(Mathf.roundToInt(currentResolution.height/10),Mathf.roundToInt(currentResolution.height/6))
the second way longer but it should work perfectly on all kind of resolutions.

Also, this thread explains how to use the GUI matrix to make the GUI independent of screen resolution.

I think that you mean layout, not resizing.
Do you mean something like this?
You definitely got to have a GUI framework which supports automatic layouts (Unity GUI is a little to basic) :wink:

We’ve made a component for making a GUI resolution and orientation independent: OrientationControl (video overview here)

And based on pretty much the same code we’ve made an entire interface that should be a good starting-point (or a fully functional plug and play solution) for anyone attempting a cross-platform game that works on iPhone/iPhone4/iPad/Android/PC/MAC/Web all with the same code, no double-coding involved! GUIKit001

hi col000r,

nice thing you got there. how is font resizing handled? are you using a custom font renderer?

We use 2 different GUISkins that have separate fonts in all the right sizes. Even though regular Unity now supports dynamic fonts, Unity iPhone still doesn’t so we had to keep it this way. (otherwise we could have just changed the font-size value in the GUISkin on the fly depending on the device)

I’m interested in buying the GUIKit, but I’d like to see the documentation or code samples first.