Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: bubucha on August 09, 2017, 02:41:28 AM
-
Hello,
UI Grid has the field maxPerColumn (maxPerLine). So the problem is that it doesn't readjust depending on the resolution, since UI Grid does it due to Flexible UIRoot.
For example, I have an inventory. It has UI Grid (and UI Scroll View). In 1024x768 there can be up to 6 items in a row (column, line), so I set it to 6. In the 1920x1080 it should be up to 9, but it is still 6, because UI Grid doesn't recalculate it.
So the question: There really is no solutions implemented for this case and I should do the logic by my hands, or am I missing something?
P.S Unity.UI has the solutions for this, so I wonder, is there really no such thing in NGUI.
Thanks in advance.
-
There's nothing built-in, and UIGrid was designed to be extremely simple, so that it's easier to tweak to your own desires. In your case you can actually write a trivial script that's basically one line of code in the Start() (or Update) -- GetComponent<UIGrid>() and set its number of rows based on the screen resolution.