As a developer, it’s annoying to read and to write simple, frequently-used UDim and UDim2 structures. I want constants to represent these common structures.
But Sharksie, won’t it be confusing that the “one” value has offset 0?
No, because zero/one constants are useful for scalar properties. They aren’t useful for nominal properties like offset. No one will write UDim2.one expecting to get 1, 1, 1, 1 because that would be useless.
Following up on this - thanks for the feature request! We’re always on the lookout for ways to streamline working with UI, so we’re happy to consider these kinds of improvements.
While we might not implement exactly this feature request, this is a useful reference point for our ongoing discussions on how to make things better. So thank you for highlighting this - we’ll see what we can do to make UDim more ergonomic to work with.
If you have specific use cases or code examples to highlight how the current APIs aren’t working well for you, we would love to incorporate those into our discussions