Hello I am attempting to setup a PIP style UI where I set a camera viewport Rect to the frame of a NGUI sprite. I cannot get this to work. I have tried nguimath CalculateAbsoluteWidgetBounds to get the bounds then convert them to viewport points but it puts my viewport all over the place. I am really hoping someone can point me in the correct direction. Tried setting up game objects on the ui but it is anchored and changes and then the game object is misplaced. Thanks for any help!
EDIT
Ok so maybe my description wasn't the best. I need to get a rect from a UIWidget in viewport coordinates. Then I can assign those values to my camera viewport.