Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: frog on August 22, 2012, 04:01:08 AM
-
how do you anchor buttons to corners of screen?
-
Look into UIAnchor.cs. Set the widget-pivot to the opposite of the UIAnchor-pivot and there you go.
-
I think what you want is described here :
http://www.tasharen.com/?page_id=418
-
Correct UIAnchor is what you need. It has options like, TopLeft, TopRight, BottomLeft, BottomRight, which would be the corners.
-
Hi!
I'm having a similar problem, but I'm already using UIAnchor. My problem is, what happens if aspect ratio is different. Let me explain myself:
- I place a button using UIAnchor to the top left, anchor set to top left.
- It works perfect inside editor, I can change the window size and it's at the right position.
- But, on iPhone5 button is not top aligned, it just goes out of screen.
How can I make it work?
Thanks!
-
Why would it? Top-left is top-left, regardless of the aspect ratio. Try building the first example for your device.
-
@bitomule, what is NGUI and Unity version ?