Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: VapapeurTeam on February 21, 2013, 05:50:01 AM

Title: How to make sure the UI remains full screen ?
Post by: VapapeurTeam on February 21, 2013, 05:50:01 AM
Hello,

I've created a very simple UI ( a tiled sprite and a button ), with all the default nodes above (UIRoot, Anchor, Camera, Panel). I can't seem to find a way to make sure my UI will always completely fill the screen. Is there a specific script I must attach somewhere to ensure that ?

Thanks.
Title: Re: How to make sure the UI remains full screen ?
Post by: VapapeurTeam on February 21, 2013, 02:45:59 PM
Bump. Any suggestions ?

Thanks in advance.
Title: Re: How to make sure the UI remains full screen ?
Post by: Nicki on February 21, 2013, 03:07:34 PM
Depends on what you want to fill the screen. If it's a single widget, like a background, look at UIStretch.cs.
Title: Re: How to make sure the UI remains full screen ?
Post by: DoctorWhy on February 21, 2013, 07:23:15 PM
I don't know if NGUI has something specific to help with this, but I just made my own script that took all the pieces of the menu, and placed them correctly no matter the screen resolution. Just have a script on the Camera that runs on Start that places everything based on the Screen.width and Screen.height.  It is easier if you make the anchor based on the bottom left corner.