![]() ![]() It also means that I don't need to add in as much stuff and I was just able to override the parts I needed, so the code has been cut down a lot shorter now, which is cool. I've updated the code to now inherit directly from UGUI's GridLayoutGroup, so now my version should work in any place that UGUI's did previously. ![]() The issue seemed to be happening because UIExtensions was trying to deal with a GridLayoutGroup from UGUI somewhere, and since I was just inheriting from the class above that, it wasn't working properly. Pull requests are Managed to fix the issue. Since the Grid Layout Group component has so many options, it made it difficult to come up with a solution that would work for every scenario, so it comes with a few issues when you're trying to use certain settings, but for the traditional horizontal/vertical middle-center aligned requirements it should work. It also supports a Vertical starting axis, although you'll need to change the Child Alignment to Middle Left/Center/Right. ![]() This fix checks to see if we're on the last row/column, and use the width/height of the number of remaining cells when choosing the starting offset. This issue happens because as it wraps around, it uses the width or height of the main axis to determine how much space is required for the overflowing cells, causing the offset to be based on a width/height of more cells than there are in that row/column. I've uploaded the fixed component to github, which you can download here. I needed this functionality recently too, and solved it by copying the Grid Layout Group component from the UGUI library and adding in a hot-fix to give it the desired functionality. ![]()
0 Comments
Leave a Reply. |