Hi, I was having an issue with UIPanel where Im creating a scrollview and Im anchoring the panel so it grows and shrinks with its parent. I have a function that collapses it so it basically hides all the items. This essentially tries to set the size of the UIPanel's width to 0. It was giving be odd result though as the panel would never go below 20 units. I dug around inside UIpanel and found this code:
float minx = Mathf.Max(20f, mClipSoftness.x);
float miny = Mathf.Max(20f, mClipSoftness.y);
if (w < minx) w = minx;
if (h < miny) h = miny;
// Update the clipping range
baseClipRegion
= new Vector4
(newX, newY, w, h
);
I was wondering why this is there and if it is safe to remove this min size so that I could do what I want it to. I tried removing it and it works, but I want to make sure that it won't break something else as Im sure it was put there for a reason.
Thanks