Placing button at corner using NGUI

Currently I am using NGUI for menu creation. In that I want to place my back button in top left corner of the screen. I have problem regarding this. Currently I am focusing on 1920x1080 resolution but when I switch to another resolution say 480x320 then my back button goes out of the screen. So I want some tips in this. Please help me in this because I already spent half day to come out of this.

Attach a UI Anchor component to your button , go to the “side” dropdown and select bottomRight or buttomLeft depending on where you want, also play with the relative offset to indent from borders.

Not that if you are using the latest version of NGUI (i think 3.0.6 or newer) there’s a new anchoring system where you can anchor any widget or panel relative to its parent.

First of all you have to add button from widget tool. Then remove Background sprite from it and attach sprite into button widget. Then set anchor of your UISprite component as per the following image.

21225-bottomleftbutton.png

Above image value set button widget at the bottom left corner. Anchor system become most useful to handle position and scale of widget as per resolution change.