Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: mansquatch on January 16, 2013, 06:29:35 PM

Title: UI stage position issue
Post by: mansquatch on January 16, 2013, 06:29:35 PM
I am having an issue with trying to get my HUD to display dynamically at any dimension (16:0 aspect ratio). I have two NGUI widgets anchored to the UIRoot. One is anchored to the top-right (with offset) while the other is anchored bottom-right (with  offset). I have other all other elements anchored to those two widgets. The problem is that while the game looks from in the Game view when I build it with the proper aspect ratio settings the 2 widgets are outside the camera's view. Do I need to create a script that repositions the UIRoot based on the stage.width and stage.height? Or, is there something wrong with the way I am anchoring the widgets?

Note: The screenshot shows what the UI looks like in the Game view.
Title: Re: UI stage position issue
Post by: ArenMook on January 16, 2013, 08:09:05 PM
No you dont need to reposition anything manually. I suggest double-checking your work. Anchors attached to sides will always respect the aspect ratio (otherwise they would be quite pointless!).
Title: Re: UI stage position issue
Post by: mansquatch on January 17, 2013, 09:21:51 AM
Thank you. Sorry, I am very new to NGUI, so, I am still learning it. The issue was the widget's pivot was set wrong.