I’m quite close to completing an inventory system. Scripting wise it’s working perfectly, however the UI is not positioning correctly.
The image below showcases the issue. The orange box’s position is set to 0.8 and the size is set to 0.2.
Not only is the position of the orange box incorrect in all 4 frames, the 4th frame’s orange box also has an additional offset to the left. Which box(es) that have an additional offset are randomized depending on the player’s viewport size.
Considering this also happends to my textLabel inside of the frames, I’m assuming that something about the UIGridlayout is configured incorrectly for proper positioning of descendants. My question for you is how I make sure the descendants of UIGridLayouts follow regular UI scaling logic.
Result
UI setup
UIGridLayout created by script