- Home /
Little image next to GUI ?
Hi there, I'm currently working on the GUI of my game.
My player has to collect gears as he runs, and the amount of gears he has collected is being shown on the top left of the screen.
I know how to use Gui skin; at least the basics of it, but I'm having a little bit of trouble putting an image of a gear next to the text.
Like the subway surfers gui (coin count).
Any help would be appreciated.
Answer by poff · May 13, 2014 at 06:07 PM
Go to GameObject --> Create Other --> GUI Texture (on the toolbar) Then put the texture you want and position it in the place you want.
Thank you for the quick answer. I used this method, but the position automatically changes at run time. How can I make sure the position stays the same, no matter the screen size ?
Sorry, but I'm not sure. Even some better games like Rust have problems with resolution. I'm sure it's possible to fix it though.
You should be able to set its position to a percentage of the screen resolution, that way it's more anchored to a relative location rather than a pixel coordinate.