On line 192/3 of UIGrid, A call to ConstrainTargetToBounds was added.
I believe this is an inaccurate addition. It breaks the concept of a grid and directly relates a grid to ANY parent panel. I believe a grid is used to align its children with respect to itself. *** I don't believe it should take any action to move itself ***
Here is the circumstances where it is being used and why it is breaking.
I use grid as I believe it should be used, to align children. Here is the hierarchy.
Panel
- GridEx (an extended grid class to use x number of children, rotating them so that you can display "infinite" number as the window scrolls.) May want to offer this in the future as it is extremely useful
- Inventory GameObject(there are multiple of these)
- Sprites/Text/etc
- Grid
- sprite
- sprtie
- ...
In this case I use the Grid which is under the Inventory GameObject to align its children sprites with respect to its parent gameobject. Here is where the problem arises, the grid itself changes it location to fit with in the Panel which is incorrect behavior. It doesn't seem like the Grid should do any repositioning of itself. It needs to remain in the location I placed it with respect to its parent.
Does this seem correct to you?