Hi!
Been struggling with this annoying issue for a long time, basically settling for UIDraggablePanel.ResetPosition() up until now. Problem is, we really need this to work and the deadline is... now.
Problem really just seems to be down to the ClippingArea not recalculating or something when calling RestrictWithinBounds(false), because as soon as a drag I little and release, it springs back as expected. Even added a simple "RestrictWithinBoundsNow"-bool which just calls the method at any time when clicked in editor, and that didn't do shit either so it's not a delay-issue in any calculations etc.
As title says, this works sometimes, and sometimes not. In the exact same place, with the exact same content swopped within the panel...
Pls halp, ripping my hair off over here!
EDIT:
Okey, if I set my tweens to debugmode (superslow) and call RestrictWithinBounds(false) when done, it works everytime (it seems). Problem is, when tweening "fast", it's still about 0.2s so there is PLENTY of time for any bounds to be recalculated etc... The content is swopped in just a few ms, so it seems unlikely for that to be the issue (since as described above, RestrictWithinBounds does nothing even if called manually a long time after the "fast" tween finishes).
EDIT2:
As I thought it is the clippingBounds that is not recalculated properly after all content has been swopped (which ofcourse is not instantaneous, might take a few ms) so when all is setup somehow the clippingBounds is "out-of-date". As soon as I move something in the scene (from editor), it recalculates to correct bounds. What to do?