- Home /
How to GUI Resize and Reposition accordingly to AR and Resolution?
Hello, I'm working on a Space Shooter that looks simiiar to space invaders. What I'm tying to figure out are a few things..
How to resize and reposition the GUI texture depending on Aspect Ratio AND resolution.
I'm using a GUI.matrix for all these things. So far, the GUI texture scales appropriately when aspect ratio changes, and repositions when the aspect ratio changes. BUT when I change the scale of the game window (resolution), the GUI texture moves in an erratic way. I want the txture to stay in the same place when I scale the window.
So what I'm trying to figure out is this..
Scaling
When Aspect Ratio Changes: GUI Texture scales relatively up or down.
When Resolution Changes: GUI Texture should scale relatively as well.
Reposition
When Aspect Ratio Changes: GUI Texture moves in the appropriate spot
When Resolution Changes: GUI Texture stays in place!