- If I play the tween back (from center of the screen to the top), it works, but as soon as it's over, the position resets to the position defined by the anchor...I have similar problem...
You can't tween any anchored object. Anchors reset its position, both in the old system and in the new one. That's kind of the point....and now I'm even more confused, I need anchors to position and scale properly my sidebar at the bottom on different screens (with different aspect ratios) and also need Tween to hide/unhide it, what's the appropriate way of doing this?
Tween something that's not anchored.
Use container objects. If you want something anchored to the right, anchor an invisible widget, then make your tweened objects children of that object. Don't actually anchor them in turn.
The only problem I've found is this doesn't work if you're trying to do something like stretch a panel's background horizontally to fit the screen, but then tween it vertically offscreen (which is what I ran into). Other than that the new anchor system has been awesome.You certainly can. Anchor left and right, but leave top and bottom free to move as you see fit.
A 'run only once' option would allow for this, but i'm open to other ideas too.
UIRect.SetAnchor(null).
Assets/Scripts/UI/UIDisableAnchorAtRuntime.cs(12,24): error CS0121: The call is ambiguous between the following methods or properties: `UIRect.SetAnchor(UnityEngine.Transform)' and `UIRect.SetAnchor(UnityEngine.GameObject)'