Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

684
Visualizações
How do i fix the layout problem in unity?

Im trying to build a replica of the game 'Breakout'.

when i build and run the game in unity it looks good and everything id the correct scale but when i build and run the project on my laptop all the elements change size and some of the elements dont change size and i am not sure if i have done anything wrong or if i have forgotten to do something to stop it from changing.

This is what the game looks like in the unity editor when playing the game:

enter image description here

And this is what it looks like once i build and run the project on my computer:

enter image description here

My resolution is set to stand alone.

is there a way to get it to look like it does in the unity editor when i build and run it on my computer because that is what its supposed to look like.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

These days, there are many different screen sizes, and resolutions.

My favorite solution is to use a reference resolution that can expand but never shrink. This allows you to have a safe zone that stays consistent across different screen sizes. For a generic case, you would use 16:9 aspect ratio, with the resolution of either 1280x720 or 1920x1080.

resolution

In Unity, on your canvas, modify the Canvas Scaler such that UI Scale Mode is set to Scale with Screen Size. Add your reference resolution, and set the Screen Match Mode to Expand.

canvas-scaler

In the Game tab you can preview what 16:9 looks like. You can try out other aspect ratios or resolutions.

resolutions

For example, the iPhone 11 has a much wider resolution, so it expands horizontally. It's up to you to design your UI in a way that makes sense. You can either keep everything in the safe zone or align elements to the corners of the screen.

enter image description here

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda