Hi,
I have my unity IOS game almost done. The problem is the GUI won’t work on the device, it works great in the editor with resolutions same as my ipod. I have a GUITexture which has transforms ( 1, 1, 0 ) which means it’s at top right. Then in pixel offsets i have -50, -50. and width/height as 50.
This means in theory that on the device it will appear at top right.
The problem is this doesn’t happen. My app is landscape left but i think it’s using the x and y from it being portrait so the actual texture isn’t on screen. I’ve spent ages trying to hack my way around it but i can’t find a solution.
Any ideas.
Thanks.
This doesn’t fix my problem unfortunately. After further testing i’ve found that if you start the app it always uses the X, Y coordinates from that orientation. So if you start the app in portrait even though app is landscape it will make everything portrait on HUD. If you start app landscape it works fine. Even if you change orientation during gameplay it won’t change the GUI.
Any ideas how to fix this :S.
The problem isn’t to do with the code you put up. The x and y coordinates are [0, 1] for screen positions but it only works on portrait. So this code won’t do anything as i don’t know the positions for landscape. You can do a crapy way and make it 1.5x and 0.5y that way it works but it means it’s just going outside the screen coordinates. So you have 1.5 width and 0.5 of the height of portrait which works out fine on IOS as there ratios are 1.5.
I have fixed it.
There is a thread at top of page to fix this issue *sigh xD. Spent so long trying to solve it