- Home /
How to make game objects in the game scene proportionally adjust position for different screen sizes?
Basically objects in the canvas, pause menu, main menu etc go out of position and become a mess when changing screen sizes. My question is how do you anchor everything so that it stays in its native position so that people playing the game on different screen sizes won't have stuff just jumbled about?
Answer by OGDE01 · Jan 21, 2019 at 09:47 PM
You can easily anchor the UI elements in the Rect Transform component. There should be a box above the "Anchors" dropdown. Just click this and select the option that best fits. That deals with the screen resizing. I also suggest adding a Canvas Scaler component to the root object. This will make it so the UI scales to the screen as well.
Oh ok I see it know. I'm still rather confused as it says hold shift to set a pivot and hold alt to set the position. Also I'm not sure what these red lines mean. Is that the side of the canvas the object is going to be anchored on?
Your answer
Follow this Question
Related Questions
Prefab Instance changing when loading scene in editor 0 Answers
How to change anchor? 1 Answer
Unity 5 UI GUI Text Canvas Screen Resolution Adaption Problem 2 Answers
Keeping relative size of UI elements constant without moving them 1 Answer
How to make my UI items/canvas stretch to fill preset aspect ratio 0 Answers