PlayMaker Updates & Downloads > Official Action Updates

Screen Resolution actions

(1/4) > >>

jeanfabre:
Hi,

 Following a request, please find few actions to work with screen resolutions. The SetResolution action is not tested tho ( I never mess with my screen resolutions :) to begin with ) so if you have problems let me know.

-- ArrayListGetResolutions requires ArrayMaker, you can find it here:
https://hutonggames.fogbugz.com/default.asp?W715
it saves resolution inside a vector3: width,height,refreshRate.

-- GetCurrentResolution works on it own, arrayMaker not required

-- ScreenSetResolution works on it own as well.

GetCurrentResolution and ScreenSetResolution accepts a vector 3 as the resolution (width,height,refreshRate) so that if you use ArrayListGetResolutions, you can simply extract on of the resolution of the arrayList and use it as is without messing with it further.

bye,

 Jean

gecko:
Get Screen Resolution is exactly what I'm looking for....but how would I use this with Set Guiskin (with several guiskins for different device resolutions)? I don't know how to set/retrieve variables, so if it requires that, I'll go learn about it, but can you give me some guidance?

jeanfabre:
Hi,

 guiskin is only a system to define how component looks, not how they are placed on screen.

 can you precise what you are after?

bye,

 Jean

Gua:
I don't understand how to get all list of resolution supported by user PC. The only thing I see when I use ArrayListGetResolutions is this.



I would like to see example or explanation.

Gua:

--- Quote from: Gua on October 06, 2014, 06:44:01 AM ---I don't understand how to get all list of resolution supported by user PC. The only thing I see when I use ArrayListGetResolutions is this.



I would like to see example or explanation.

--- End quote ---

Looks like I've found the core of the problem.

"Screen.resolutions always returns 640x480 in the editor, presumably because there is no particular resolution in the editor; the game window can be anything. In a stand-alone or web player, though, Screen.resolutions does in fact return an array of all resolutions. You can see this in use with various Unity games that have in-game resolution switching (like this one).

--Eric"

Navigation

[0] Message Index

[#] Next page

Go to full version