With my project, Legend of the Eldritch, back on-track I realized that textured GUI is difficult to do right. Issues I ran into are:
Stretching;
(Stretched GUI looks awful but I don’t want to use simplistic GUI in a game that’s supposed to be realistic. It won’t suit the aesthetics!)
9-slice is not ideal ;
(9-slice only works well when the GUI does not have any form of details for it will stretch the details out nonetheless; I want to keep the details, though!)
Unless I’m mistaken these issues are bothersome and I’m wondering if anyone knew one or two solutions.
Example GUI
The GUI below is an old GUI I used as background for certain menus. I will re-design the GUI later on.
With this example in mind, could anyone help me out with how I can properly re-design the GUI in general so that stretching will be minimal while it allows responsiveness (e.g re-scaling the same GUI with minimal stretching)?
Your best bet is to scale it but use a UIAspectRatioConstraint so it doesn’t look stretched out, might look blurry on really large screens but it won’t look elongated or anything
You could try making your frame out of three segments (I’ll demonstrate it horizontally, but this works vertically too - you can even try and do both at once!)
Here’s how:
You’re gonna have two frames for each end of the UI and one middle bit of the frame you want to stretch out. We’ll call them start, middle and end, and they come together to make the entire frame:
You can use a UIAspectRatioConstraint to make sure the start and end frames don’t stretch in any weird ways. Then, the middle frame takes up all the space between the start and the end (you might need a small script to calculate the size of the middle frame for this, unless you’re using Offset scaling in the rest of the UI)
On the start and end frames, we can just put the start and end parts of the frame:
Then, the middle frame needs to fill in that remaining space!
A visually appealing way of doing this is by using a tiling image (you can set the ScaleType of the image to Tile to do this)
This will repeat a section of the frame image over and over to fill the gap: