Author Topic: 3.0.7f2 - Problems Anchoring to Screen Positions  (Read 1977 times)

Ferazel

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 150
    • View Profile
3.0.7f2 - Problems Anchoring to Screen Positions
« on: December 12, 2013, 12:12:23 PM »
Hi, I upgraded to f2 and now I'm having problems figuring out how to get widgets to parent to screen coordinates (top-left) for example.

My 2D hierarchy is the following
UIPanel
--UICamera
--GameObjectParent
----UISprite
------UISprite
------UILabel

When I try to anchor, it correctly finds the UIPanel GameObject. However, when I try to specify Advanced and set only the top and left coordinates in the anchor settings it is sticking it in my main camera's space and not in the UI space. Am I doing something wrong from what anyone can tell? It seemed to be working properly in f1 so was there a change that I need to do in order to get sprites to screen anchors in F2?

A second question. Are you going to deprecate the old UIAnchor script? While I find the new anchoring system powerful, I find a little cumbersome to use. (A lot of selecting NONE for simple point anchoring using Advanced) I also miss being able to anchor non-widget GameObjects in the new system as I often have a "ViewController" GameObject that will contain a controller script that manages the widgets underneath it.
« Last Edit: December 12, 2013, 12:21:08 PM by Ferazel »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: 3.0.7f2 - Problems Anchoring to Screen Positions
« Reply #1 on: December 12, 2013, 02:27:23 PM »
UIAnchor script will remain as it is. It's deprecated in a sense that I no longer tell people to use it, but they're welcome to if it suits their needs better. So it's more for advanced users at this point.

As for the issue you're running into... I'm not sure I understand it. It's sticking it in your main camera space? Not sure what you mean. Make sure all layers are correct though. While on the same subject, I've noticed that the widget gets offset when anchoring to a 3D object that's not a part of the UI (initially when the target is set in inspector, I mean) -- and I've gone ahead and fixed that on my end.