Hello.
I know i should post this in the Feedback section, but that page sucks pretty hard, because you cant upload image and i my pages never get any recognition.
So my feedback/feature request is: Disable anchor clamping.
Why are they clamped from 0 to 1? Can you make it at least an “option” to disable it? It would be very usefull in many scenarios.
Heres an example of why:
Lets say I am working with different screenresolutions and dpi’s and i want to make an animation where a Button will move into the screen, and starting from above the screen by 100% of its pixel height
But now if i make the screens height smaller (dragged the animationwindow upwards to make it smaller), then the start position in the beginning of the animation is not starting from 100% of its height above the screen, and that will of course make a small delay at the beginning when it will start animate into the screen.
If i it was possible to disable the anchors clamp, then you could animate the anchors instead of the offsets, and let the offset always be 0, then the start position in the animation will always be where it should be no matter what screensize you have.
So right now, I simply cant find any solution on how i would be able to make this simple animation happen at this moment and I definitely cant see any drawback by removing this useless clamping restriction.
Do you have a canvas scaler on your root Canvas? The point of this component is to scale your whole canvas so positions stay relative. I am also guessing your working in free aspect. Don’t do that as it shows results that you would never see on a build. Set your aspect ratio to something valid.
Ahh, i didn’t know that, i see i can do that now.
But now the problem is that i cant reuse my animation, because many ui elements have different sizes like this
This works well
Here, i reuse the same animation on another button that has smaller size.
The way you have setup your anchors, you wouldn’t be able to reuse the animations even if the anchors were not clamped. You can see in your images that the end position you’d want for the anchors are different for the left and right box.
Not saying unclamped anchors couldn’t be useful for other things, but it doesn’t seem like it will help in your speciifc use case.
Oh yes, that was a mistake…
But if i parented it to another object, and set the anchorMin to {0;0}, and max to {1;1}, and offesets to 0, then im able size it any way i want!
However my point about the picture was about the 100% height thing which you are only cabable of achieveving if the clamp can be turned off.
But the ultimate question is why have you implemented the clamp?
Why not make at least an option to disable it?
What is the drawback of it?
We’ve implemented support for dragging anchors outside of the bounds of the parent rect when holding down Control (or Command on Mac) - the same key that disables snapping.
It may take a few patch releases before the code makes it to a release.
Just saw your posting randomly, I was just thinking there has not been many uGUI updates for long time - is there a changelog of upcoming updates?. I’m concerned that there many “small” issues with uGUI and Android devices, missing UI etc although these are not major showstoppers they do cause us to waste lot of time debugging.
Well we’re talking about fixes and maybe a few improvement; not new “features” as such. But yes, it’s possible in this one instance that 5.x will lag behind 4.x by up to a few months.