I developed a 3d game its menu is obviously in 2d the issue am facing is that after deployment the GUI buttons in the menu screens misplaced though i placed them accurately through scripting, I don’t know why they got misplaced after deployment… need urgent help
What do you mean by though i placed them accurately through scripting? Did you ensure that you were working with same screen resolution and aspect ratio than your device (android phone)?
edit: You can get screen aspect ratio and resolution through the Screen class.
float aspectRatio = Screen.width/(float)Screen.height; Resolution curRes = Screen.currentResolution;
From that, the center point on the screen is:
Vector2 center = 0.5f*new Vector2(Screen.width, Screen.height);
i didn’t but screen resolution will vary phone by phone,so i want a solution because of which the buttons gt fix for any resolution