ezScreenplacement - with resolution change

ezScreenplacement - with resolution change

Postby visteleEZGUI » Wed May 02, 2012 2:23 am

hey, I have a GUi that pops up and stay int he middle of the screen, I have scripts on buttons that change the resolution from 1024/576 up to 2560/1440. The resolution changes, however the menu does not appear to be pixel perfect afterwards.

The menu stays at the original 1280/720 resolution. It still stays centered, but does not 'scale down' at ultra resolutions as you would expect. Is there a speciaifc workflow to be used when changing resolution??

Something that needs to be refreshed etc.


nb. the resolution change script is just:
// Switch to 640 x 480 fullscreen

Screen.SetResolution (1920, 1080, true);
Posts: 9
Joined: Sun Mar 18, 2012 8:27 pm

Re: ezScreenplacement - with resolution change

Postby Brady » Wed May 02, 2012 9:37 pm

Since Unity doesn't have a callback/delegate for when the resolution changes, anything that needs to respond to a chance in resolution has to monitor the resolution every frame and compare the current resolution to the previous one. Obviously this would be horribly inefficient for every pixel-perfect or EZScreenPlacement-using object to check for every frame. So instead, these objects only do their calculation once at start. After that, if you change resolutions, you'll need to let them know. Since in your case, the resolution is changed by pressing buttons, you don't need to incur the overhead of watching for resolution changes every frame - you can simply call some code when a resolution change button is clicked.

Specifically, the easiest way to go about "telling" the EZ GUI objects to re-calculate their resolution-dependent settings is to have some common parent object somewhere up the hierarchy, and then attaching a script to this parent object with the following line:


This line will call all the UpdateCamera() methods in its children, causing them to re-calculate their screen-dependent settings.
Posts: 5361
Joined: Tue Jul 06, 2010 11:33 pm

Re: ezScreenplacement - with resolution change

Postby visteleEZGUI » Sun May 06, 2012 1:40 am

Awesome, Thanks for a detailed reply Brady. I have the right structure already, so will try it out now.
Posts: 9
Joined: Sun Mar 18, 2012 8:27 pm

Re: ezScreenplacement - with resolution change

Postby visteleEZGUI » Mon May 07, 2012 2:05 am

Hi again Brad,
I've tried that but don't seem to be getting anywhere.

I'm a real novice at scripting, I use Playmaker for nearly everything in my projects.

Does the message have to be in function update?
Posts: 9
Joined: Sun Mar 18, 2012 8:27 pm

Re: ezScreenplacement - with resolution change

Postby visteleEZGUI » Mon May 07, 2012 2:16 am

Hi again, Just checking something. Do all EZGUI parents need to be active/enabled for things to run properly? I have been hiding certain objects that I don't want to see and be able to click based on user input's

I've now been enabling all GUI objects before running the script, but Ala, can't seem to get anything happening!
Posts: 9
Joined: Sun Mar 18, 2012 8:27 pm

Re: ezScreenplacement - with resolution change

Postby Brady » Fri May 11, 2012 8:00 am

You'll want to do the check for a change of resolution in Update(), yes, so that it checks each frame. That is, unless your resolution change happens as a result of user input, in which case, just put the code in a method that gets called as a result of that user input. Off the top of my head, I don't recall whether or not BroadcastMessage() works on inactive GameObjects or not. If it's an option for you, you may try, instead of deactivating the GameObjects you want to hide, just use the respective EZ GUI component's .Hide() method. For example, if you want to hide a button, you call the button component's .Hide() method and pass it true, like so:


Also make sure that the script that contains the BroadcastMessage() call is attached to your common parent object - a GameObject under which all your GUI objects are children. They don't have to be immediate children (they can be grandchildren, great-grandchildren, etc), just as long as they are somewhere in the child hierarchy. This is because BroadcastMessage() sends messages "down" the hierarchy, but not up.
Posts: 5361
Joined: Tue Jul 06, 2010 11:33 pm

Re: ezScreenplacement - with resolution change

Postby visteleEZGUI » Tue May 15, 2012 1:53 am

Ok, so I am enabling all of the objects with EZgui components, The highest level object has a script on it broadcasting the message to 'check resolution'

This script is disabled by default and when the user presses a resolution change button, I have a playmaker state machine that waits a few seconds and then enables the above script.

I'm still not getting any refreshing of the elements though. Must be something wrong with the coding of the script. Maybe because I don't yet know what a method is :o
Posts: 9
Joined: Sun Mar 18, 2012 8:27 pm

Re: ezScreenplacement - with resolution change

Postby Brady » Fri May 18, 2012 9:00 am

Just to clarify, you want to have the "check resolution" code run each frame in a single script only. Then when a resolution change is detected, you broadcast "UpdateCamera" down to the objects.

I'm not sure why you're disabling the script, and then enabling it though. If you're using a resolution change button, then instead of checking the resolution, you know that when the button has been clicked, the resolution is going to change, so at that point, have that button execute the method in your script that broadcasts the message.
Posts: 5361
Joined: Tue Jul 06, 2010 11:33 pm

Postby czwen » Fri Dec 02, 2016 12:49 pm

coach factory outlet online
stan smith adidas
adidas superstar
adidas superstars
adidas nmd r1
adidas nmd runner
adidas nmd r1
adidas nmd runner
adidas yeezy boost 350
yeezy boost
adidas yeezy boost
yeezy shoes
cheap jerseys wholesale
cheap nfl jerseys
coach outlet online
coach factory outlet online
michael kors outlet sale
michael kors handbags
mlb jerseys
mlb jerseys
cheap air max
air max outlet
louboutin outlet
louboutin sale
yeezy boost
adidas nmd runner
michael kors outlet clearance
michael kors outlet store
coach outlet online
coach factory outlet online
discount nike shoes
cheap nike sneakers
coach outlet online
coach factory outlet online
hollister clothing store
hollister co
red bottom shoes
cheap bottom shoes
cheap ray bans
air max 90
louis vuitton outlet online
north face outlet
coach outlet store online
michael kors outlet online
michael kors outlet store
james shoes
lebron shoes 
birkenstock uk
cheap jordan shoes
air jordans
nike flyknit
nike free 4.0 flyknit
timberland outlet
timberland shoes
pandora outlet
pandora charms
abercrombie outlet
kobe bryant shoes
polo ralph lauren outlet
polo ralph lauren outlet online
true religion sale
true religion uk
rolex watches for sale
Replica Rolex
michael kors uk
kate spade uk
kate spade bags
louis vuitton uk
louis vuitton purse
hollister uk
christian louboutin uk
louboutin shoes
north face jackets
north face uk
true religion jeans outlet
true religion outlet store
true religion outlet store
cheap jordan shoes
dolce and gabbana outlet online
hugo boss outlet online
hugo boss suits
pandora charms sale clearance
rolex watches
toms outlet store
michael kors handbags outlet
kate spade outlet online
canada goose outlet
canada goose outlet
ugg sale
christian louboutin outlet
longchamp bag
longchamp handbags
michael kors bags
michael kors
moncler outlet online
moncler jackets
moncler jackets
ugg australia
Posts: 64
Joined: Fri Dec 02, 2016 8:57 am

Re: In close proximity to the Empire: Yankees information -

Postby Sjcg123 » Thu Dec 29, 2016 8:29 am

pandora rings
Nike Store
Canada Goose Coats For Men
Jordan Schoenen
Air Max For Sale
Anelli Pandora
Uggs Outlet Store
Nike Factory Store
Nike Air Sneakers
Oakley Sunglasses Cheap
Toms Shoes For Women
ugg boots classic
Coach Bags On Sale
Sneakers Nike
canada goose jackets on sale
zapatilla adidas
nfl store
Nike Air Max Boutique
longchamp bags on sale
Michael Kors
nike tn pas cher
Pandora Official Website
nike joggesko
Nike Air Max 90
Adidas Originals Superstar
adidas outlet stores online
Michael Kors handbag discount
Ray ban sale online
Ugg Outlet Online Store
Nike Black Friday
pandora charm bracelet sale
Ugg Boots On Clearance
chaussures de foot pas cher
Orecchini Pandora
converse store
Veste Moncler Pas Cher
Moncler Sale
hyperdunk 2014
Air Max Femme
Nike Air Jordan 11
tru religion jeans
Bottes Ugg Pas Cher
new pandora charms
chaussure basket homme
botas de futbol
Veste Moncler Femme
Canada Goose Sale Outlet
Moncler Store
nike air jordan pas cher
Jordan Future
Air Huarache
pandora beads
ray ban wayfarer eyeglasses
uggs for women
moncler outlet
Michael Kors handbag on sale
Boutique Ugg
cheap real uggs
Timberland skor
reebok running shoes
ugg outlet online
Stone Island Outlet
air jordan
goedkope nike air max
Ugg Pas Cher Femme
Uomo Hogan
cheap nike air max
ugg factory outlet
canada goose online store
Adidas Shoes Discount Marketplace
australia uggs outlet
nike damenschuhe
new yeezy shoes
Ugg Noir Pas Cher
Michael Kors Outlet
zapatillas nike baratas
běžecké boty nike
new jordan releases
Nike Air Huarache For Sale
Air Jordan Release Date
nike sportschuhe
Air Max Sneakers
uggs for cheap
Moncler Jacket Womens
pandora bracelet charms
Moncler Outlet Online
Chestnut Ugg Boots
longchamp tote bag
adidas store
Canada Goose Official Site
Pandora Beads And Charms
nike jordan shoes
Toms Outlet Online
Uggs Pas Cher Soldes
nike mercurial soccer cleats
cheap air max outlet
Ugg Homme Pas cher
toms shoes outlet
newest lebron shoes
Botte Ugg Femme
Nike Air Max Cheap
Air Jordan News
hogan rebel donna
chaussures nike pas cher
Michael Kors Handbags Discount
ugg boots outlet online
uggs outlet
pandora outlet store
Boty Nike Air
nike air schuhe herren
sac a main michael kors
adidas outlet
Air Max 90
Nike Air Max Soldes
cheap uggs
Pandora Store
Adidas Superstar
Ugg Classic Tall
Ugg Button
Air Nike
pandora online
Canada Goose Outlet Store
michael kors bags outlet
toms sale
scarpe nike
cheap christian louboutin
Jordan Sneakers For Sale
moncler jacket sale
nike air
Canada Goose Womens Coats
Nike Pas Cher Homme
scarpe hogan outlet
Cheap Michael Kors
Doudoune Femme Pas Cher
zapatos de futbol nike
nike boty dámské
Doudoune Moncler Solde
nike chaussures
coach factory outlet online
canada goose jacket outlet
Soldes Ugg
air force one pas cher
adidas schoenen
Nike Pas Cher Femme
nike free
Sheepskin Ugg Boots
nike sb stefan janoski
nike schuhe günstig
Doudoune Moncler Pas Cher
canada goose sale online
chaussure Nike homme
billige nike sko
religion store
portafoglio michael kors
Original Ugg Boots
Nike Zapatos
pandora jewelry store
australia uggs outlet
zapatillas running
Canada Goose Outlet
Chaussure Nike Air Max Pas Cher
official NHL jerseys
Canada Goose Outlet
moncler coats for women
sac coach soldes
Air Max Femme Pas Cher Soldes
Chaussure Nike Pas Cher
nike air max running shoes
Soccer Boots Outlet nike
Ugg boots Sale
Nike Air 90
Ugg Femme Pas Cher
Nike Air Women
moncler girls
ugg clearance
canada goose jackets for women
Nike Online Store
womens nike air max
Bottes Ugg Femme Pas Cher
Cheap Stone Island Jackets
prada outlet
ugg boots cheap
fitflops sale uk
abercrombie and fitch store
Jordan Store
nike shoes
Doudoune Moncler Site Officiel
Womens Ugg Boots
louboutin heels
Ray-Ban Official Discounted Site
retro jordans for cheap
23 is back
Ugg Grise Pas Cher
Lebron 13
ugg boots for women
Sportschuhe Nike
michael kors handbags on sale
adidas kläder
nike sportschuhe damen
Negozi Pandora
Oakley Outlet
ugg store
huarache sneakers
hogan scontate
cheap uggs for women
vans shoe store
christian louboutin outlet
nike sneakers
Posts: 326
Joined: Sun Oct 16, 2016 6:19 am


Return to EZ GUI General

Who is online

Users browsing this forum: sceteency, sinuipurnogue and 8 guests