So I have a reference object which is 1152x2048. I also have my canvas set to reference resolution of the same size.
If I put the GUI button at 135, 250, it puts the button around the middle of the play screen. When I export to iOS to test, the button is placed up in the far left corner. So it looks like x,y is being placed in reference to the screen resolution, but what can I do to have it show in the same location during play testing?
If you have canvas and use new ui you have option to keep aspect ratio. And if not you can set it at % of screen.width and screen.height like at 10% of width and 50% of height
Why are you using a Canvas and a GUI.Button together? The two are part of different systems, that are pretty much incomparable with each other.
Use a Button component from the new UI instead. Place the anchors on the corners of the screen for a button that stretches. Or all in the corner to keep the button in position relative to the corner.
Ya you are right. I ended up with a button from the new UI, attached my sprite to it, setup my levelmanager in the On Click, and it works as expected. I tried making that work before but didnt. I think doing this stuff at 4am probably contributed to it not working properly. Lol
Anyways it all works now and thx!
So is Gui.Button simply the old way of doing things? Just curious as I have only be been using Unity for a few months.