How to have a hideable background image that scales automatically.
Asked Answered
S

2

0

I've been messing around with a HUD and various screen sizes. I set preferences to scale and chose a resolution of 3840 x 2160 (or close to that, I forget exactly)

I have a binocular view that displays a texturerect with the typical black background and twin overlapping transparent holes that works perfectly - but it doesn't scale! After doing a lot of searching it seems like texturerects aren't the way to go and I've seen suggestions for using the texture to set the color of a colorrect but I can't see how you would do that at all.

Is there a simple way to have a bitmap background that scales properly (like labels do)?

Swath answered 31/1, 2023 at 22:23 Comment(0)
C
0

Swath I've seen suggestions for using the texture to set the color of a colorrect but I can't see how you would do that at all.

I'd probably just give the colorrect a custom shader.

Coeternal answered 1/2, 2023 at 0:11 Comment(0)
S
0

After even more messing around I discovered that deleting the old control and texture rec, saving, quiting, restarting, reloading, then add back the control and texturerect make it suddenly scale properly! At least after I check the "expand" control.

I dunno whether this is from a bug of some sort or some setting I changed somewhere that prevented the scaling from working. Now I can get back to learning Gadot!

Swath answered 1/2, 2023 at 5:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.