Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: ilovelessons on March 16, 2017, 10:12:35 PM

Title: How to make your game fit all resolutions?
Post by: ilovelessons on March 16, 2017, 10:12:35 PM
Hi,

I am newish to playmaker and I was wondering how to go about making my game fit all mobile screen sizes.  Are there any playmaker tutorials out there that can explain this. Or can this be done easily without playmaker?  Is there any existing scripts I can just attach to my game that will automatically size it to different screen resolutions? Any advice on where or what I should be looking for?

Thanks guys
Title: Re: How to make your game fit all resolutions?
Post by: jeanfabre on March 17, 2017, 01:51:29 AM
Hi,

 first, you should be using either the new Unity UI system ( ugui) or a good, up to date and battle tested UI alternative, such as nGui.

 I'll concentrate on uGui:

uGui has a canvas scaler component which is where you'll be setting how your canvas behave depending on screensize and dpi. For quick setup, I usually pick "Scale with Screensize" and set the MAtch to be width and height at 0.5. don't forget to properly design everything using the  reference resolution you pick.

fitting all resolutions with one setup is still something that I believe is not available, you'll have to change your scaling depending on retina in some cases, simply by checking which device you are running on, you can do that with PlayMaker yes,

 Bye,

 Jean

Title: Re: How to make your game fit all resolutions?
Post by: djaydino on March 17, 2017, 02:58:18 AM
Hi,
I set the aspect ration this way

(http://i68.tinypic.com/2unw0hw.jpg)

and for the canvas i had a project sliding stuff sideways and i had to use this to set the resolution :

(http://i66.tinypic.com/x1c41j.jpg)
Title: Re: How to make your game fit all resolutions?
Post by: ilovelessons on March 17, 2017, 09:49:47 AM
Thank you so much guys. Its a lot to process but i'' start looking and the info you gave me .. thanks a million... :D :D

Title: Re: How to make your game fit all resolutions?
Post by: HeathClose on March 17, 2017, 10:36:24 AM
maybe I'm doing it wrong then.. I've been using the expand option with a native resolution in the canvas scaler because it seems to work every time and .5 width/height seems to give me some weirdness here and there... is expand a bad option?
Title: Re: How to make your game fit all resolutions?
Post by: djaydino on March 17, 2017, 04:50:35 PM
Hi,
Anything that works for you is not wrong :)

I am not entirely sure what you mean by expand.

Maybe you can share some pics or video on how you set it up?
Title: Re: How to make your game fit all resolutions?
Post by: HeathClose on March 17, 2017, 06:14:39 PM
Hi,
Anything that works for you is not wrong :)

I am not entirely sure what you mean by expand.

Maybe you can share some pics or video on how you set it up?

(https://www.dropbox.com/s/axbelmvvafrpvf5/Screenshot%202017-03-17%2017.13.06.png?dl=1)
Title: Re: How to make your game fit all resolutions?
Post by: jeanfabre on March 20, 2017, 02:05:29 AM
Hi,

 uhm, I'll have to try this mode.

 Bye,

 Jean
Title: Re: How to make your game fit all resolutions?
Post by: djaydino on March 20, 2017, 04:25:05 PM
Hi,
Lol i did not even know that mode mas there :P
But as i understand from you, it has issues?
Title: Re: How to make your game fit all resolutions?
Post by: HeathClose on March 20, 2017, 04:47:51 PM
Hi,
Lol i did not even know that mode mas there :P
But as i understand from you, it has issues?

actually, it works perfect every time... I only get issues if I use the .5 method on height and width..