Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: KozTheBoss on April 30, 2013, 05:36:00 AM

Title: Suggestions on building GUI for a ceartain resolution?
Post by: KozTheBoss on April 30, 2013, 05:36:00 AM
Hi guys, so im on the home-stretch of my grad project, and my teacher has told me that i need to build the game for 1280x720 for it to fit their laptops

What is annoying me right now is that when im placing all my GUI elements in the Unity editor game pre-view window, i have no idea how it will look when it is build to 1280x720, so i am just repeating trial and error small changes

for an example, look at the built game, see the GUITEXT needs to go slightly left to line up with the GUI texture - edit it slightly left (this will look wrong in the editor since it is another size than 1280x720) and then build again - look and repeat until everything looks right

Is there any way to specify the size of the "game" window in the unity editor for when adjusting the GUI elements? or any other tips you have?


Any help appriciated!

Thanks in advance

-Fred
Title: Re: Suggestions on building GUI for a ceartain resolution?
Post by: doppelmonster on April 30, 2013, 10:21:42 AM
Im in the same struggle right now.

If you change plattform in the build settings you get different aspect ratio options in the game panel. set this to the correct aspect and you are good.
(like im building for Android 800x480. But when i switch the build to webplayer i dont have this aspect anymore. so for GUI placement i have to switch back to android)
Title: Re: Suggestions on building GUI for a ceartain resolution?
Post by: jeanfabre on May 13, 2013, 05:44:28 AM
Hi,

 Most 2d ui frameworks will allow you to anchor to screen left, top, top left, center etc etc, I strongly suggest you do that, 2dToolkit and nGui have that for sure, I use it all the time.

 Now, if you are only using guitexture, you can do so to, by changing the transform position, they range from 0 to 1, you can achieve anchoring like that too.

With Unity GUI, you can do so too by using guiLayout stuff.

bye,

 Jean
Title: Re: Suggestions on building GUI for a ceartain resolution?
Post by: doppelmonster on May 13, 2013, 06:16:49 AM
Great info. Im using GUI Element and was breaking my head how to change the anchor point.

Thanks a lot.